import MyNat.Definition
namespace MyNat
open MyNat
Proposition world.
Level 9: a big maze.
Hint: Lean's "congruence closure" tactic cc
is good at mazes. You might want to try it now.
Perhaps I should have mentioned it earlier.
Lemma
There is a way through the following maze.
example (example: ∀ (A B C D E F G H I J K L : Prop), (A → B) → (B → E) → (E → D) → (D → A) → (E → F) → (F → C) → (B → C) → (F → G) → (G → J) → (I → J) → (J → I) → (I → H) → (E → H) → (H → K) → (I → L) → A → LAA: PropBB: PropCC: PropDD: PropEE: PropFF: PropGG: PropHH: PropII: PropJJ: PropKK: PropL :L: PropProp) (Prop: Typef1 :f1: A → BA →A: PropB) (B: Propf2 :f2: B → EB →B: PropE) (E: Prop:E →E: PropD) (D: Prop:D →D: PropA) (A: Propf5 :f5: E → FE →E: PropF) (F: Prop:F →F: PropC) (C: Prop:B →B: PropC) (C: Propf8 :f8: F → GF →F: PropG) (G: Propf9 :f9: G → JG →G: PropJ) (J: Prop:I →I: PropJ) (J: Propf11 :f11: J → IJ →J: PropI) (I: Prop:I →I: PropH) (H: Prop:E →E: PropH) (H: Prop:H →H: PropK) (K: Propf15 :f15: I → LI →I: PropL) :L: PropA →A: PropL :=L: PropA, B, C, D, E, F, G, H, I, J, K, L: Prop
f1: A → B
f2: B → E
f3: E → D
f4: D → A
f5: E → F
f6: F → C
f7: B → C
f8: F → G
f9: G → J
f10: I → J
f11: J → I
f12: I → H
f13: E → H
f14: H → K
f15: I → LA → LA, B, C, D, E, F, G, H, I, J, K, L: Prop
f1: A → B
f2: B → E
f3: E → D
f4: D → A
f5: E → F
f6: F → C
f7: B → C
f8: F → G
f9: G → J
f10: I → J
f11: J → I
f12: I → H
f13: E → H
f14: H → K
f15: I → L
a: ALA, B, C, D, E, F, G, H, I, J, K, L: Prop
f1: A → B
f2: B → E
f3: E → D
f4: D → A
f5: E → F
f6: F → C
f7: B → C
f8: F → G
f9: G → J
f10: I → J
f11: J → I
f12: I → H
f13: E → H
f14: H → K
f15: I → L
a: AIA, B, C, D, E, F, G, H, I, J, K, L: Prop
f1: A → B
f2: B → E
f3: E → D
f4: D → A
f5: E → F
f6: F → C
f7: B → C
f8: F → G
f9: G → J
f10: I → J
f11: J → I
f12: I → H
f13: E → H
f14: H → K
f15: I → L
a: AJA, B, C, D, E, F, G, H, I, J, K, L: Prop
f1: A → B
f2: B → E
f3: E → D
f4: D → A
f5: E → F
f6: F → C
f7: B → C
f8: F → G
f9: G → J
f10: I → J
f11: J → I
f12: I → H
f13: E → H
f14: H → K
f15: I → L
a: AGA, B, C, D, E, F, G, H, I, J, K, L: Prop
f1: A → B
f2: B → E
f3: E → D
f4: D → A
f5: E → F
f6: F → C
f7: B → C
f8: F → G
f9: G → J
f10: I → J
f11: J → I
f12: I → H
f13: E → H
f14: H → K
f15: I → L
a: AFA, B, C, D, E, F, G, H, I, J, K, L: Prop
f1: A → B
f2: B → E
f3: E → D
f4: D → A
f5: E → F
f6: F → C
f7: B → C
f8: F → G
f9: G → J
f10: I → J
f11: J → I
f12: I → H
f13: E → H
f14: H → K
f15: I → L
a: AEA, B, C, D, E, F, G, H, I, J, K, L: Prop
f1: A → B
f2: B → E
f3: E → D
f4: D → A
f5: E → F
f6: F → C
f7: B → C
f8: F → G
f9: G → J
f10: I → J
f11: J → I
f12: I → H
f13: E → H
f14: H → K
f15: I → L
a: ABA, B, C, D, E, F, G, H, I, J, K, L: Prop
f1: A → B
f2: B → E
f3: E → D
f4: D → A
f5: E → F
f6: F → C
f7: B → C
f8: F → G
f9: G → J
f10: I → J
f11: J → I
f12: I → H
f13: E → H
f14: H → K
f15: I → L
a: AA-- BUGBUG: NNG uses cc which is missing in lean4...Goals accomplished! 🐙
Now move onto advanced proposition world, where you will see
how to prove goals such as P ∧ Q
(P
and Q
), P ∨ Q
(P
or Q
),
P ↔ Q
(P ⟺ Q
).
You will need to learn five more tactics: split
, cases
,
left
, right
, and exfalso
,
but they are all straightforward, and furthermore they are
essentially the last tactics you
need to learn in order to complete all the levels of this tutorial,
including all the 17 levels of Inequality World.
Next up advanced proposition world.