-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🎉 starCases, replace StarCat by Mathlib.Logic.Relation.ReflTransGen
- Loading branch information
Showing
5 changed files
with
84 additions
and
141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import Mathlib.Logic.Relation | ||
|
||
theorem starCases {r : α → α → Prop} {x z : α} : | ||
Relation.ReflTransGen r x z → (x = z ∨ (x ≠ z ∧ ∃ y, x ≠ y ∧ r x y ∧ Relation.ReflTransGen r y z)) := | ||
by | ||
intro x_rS_z | ||
induction x_rS_z using Relation.ReflTransGen.head_induction_on | ||
· left | ||
rfl | ||
case head a b a_r_b b_r_z IH_b_z => | ||
cases Classical.em (a = b) | ||
case inl a_is_b => | ||
subst a_is_b | ||
cases IH_b_z | ||
case inl a_is_z => | ||
left | ||
assumption | ||
case inr IH => | ||
right | ||
assumption | ||
case inr a_neq_b => | ||
cases IH_b_z | ||
case inl a_is_z => | ||
subst a_is_z | ||
right | ||
constructor | ||
· assumption | ||
· use b | ||
case inr IH => | ||
cases Classical.em (a = z) | ||
· left | ||
assumption | ||
· right | ||
constructor | ||
· assumption | ||
· use b |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters