lean4-htt/doc/examples/NFM2022/nfm14.lean
2022-05-23 18:20:37 -07:00

31 lines
592 B
Text

/- Tactics -/
example : p → q → p ∧ q ∧ p := by
intro hp hq
apply And.intro
exact hp
apply And.intro
exact hq
exact hp
example : p → q → p ∧ q ∧ p := by
intro hp hq; apply And.intro hp; exact And.intro hq hp
/- Structuring proofs -/
example : p → q → p ∧ q ∧ p := by
intro hp hq
apply And.intro
case left => exact hp
case right =>
apply And.intro
case left => exact hq
case right => exact hp
example : p → q → p ∧ q ∧ p := by
intro hp hq
apply And.intro
. exact hp
. apply And.intro
. exact hq
. exact hp