Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit f9bad50

Browse files
committedJan 22, 2025·
Prove Finite.wellfounded_of_irrefl_TC
1 parent b4a3cd8 commit f9bad50

File tree

1 file changed

+5
-16
lines changed

1 file changed

+5
-16
lines changed
 

‎Pdl/TableauPath.lean

+5-16
Original file line numberDiff line numberDiff line change
@@ -706,27 +706,16 @@ instance PathIn.instFintype {tab : Tableau Hist X} : Fintype (PathIn tab) := by
706706
refine ⟨allPaths tab, PathIn.elem_allPaths⟩
707707

708708
-- mathlib?
709-
theorem fintype_wellfounded_of_AntiSymmTransGen [Fintype α]
710-
(r : α → α → Prop) (i : IsIrrefl α (Relation.TransGen r)) (h : IsAntisymm α (Relation.TransGen r))
711-
: WellFounded r := by
712-
generalize p : Fintype.card α = n
713-
induction n generalizing α r h i with
714-
| zero => apply Fintype.card_eq_zero_iff.mp at p; apply wellFounded_of_isEmpty
715-
| succ m ih =>
716-
constructor
717-
intro a
718-
apply acc_transGen_iff.mp
719-
have : DecidablePred fun x => Relation.TransGen r x a := sorry
720-
have hyp : Fintype.card { x // Relation.TransGen r x a} ≤ Fintype.card α := by apply Fintype.card_subtype_le
721-
sorry
722-
--cases hyp
723-
--apply Fintype.subtype_card.mpr at hh
709+
theorem Finite.wellfounded_of_irrefl_TC {α : Type} [Finite α] (r : α → α → Prop)
710+
(h : IsIrrefl α (Relation.TransGen r)) : WellFounded r :=
711+
let wf := Finite.wellFounded_of_trans_of_irrefl (Relation.TransGen r)
712+
fun a => acc_transGen_iff.mp <| wf.apply a⟩
724713

725714

726715
/-- The `⋖_` relation in a tableau is *converse* well-founded. -/
727716
-- TODO: Better way to say this? Use `Function.swap` maybe?
728717
theorem edge.swap_wellFounded :
729718
WellFounded (fun p q => @edge Hist X tab q p) := by
730-
apply fintype_wellfounded_of_AntiSymmTransGen
719+
apply Finite.wellfounded_of_irrefl_TC
731720
-- IDEA: if the TransGen would have a loop that must be a repeat not allowed by `nrep`?
732721
sorry

0 commit comments

Comments
 (0)
Please sign in to comment.