Built with Alectryon. Bubbles () indicate interactive fragments: hover for details, tap to reveal contents. Use Ctrl+↑ Ctrl+↓ to navigate, Ctrl+πŸ–±οΈ to focus. On Mac, use ⌘ instead of Ctrl.
Hover-Settings: Show types: Show goals:
import Mathlib.Tactic
import Mathlib.Data.Real.Basic
import Mathlib.Tactic

universe u1 u2 u3

-- See Help.lean for a full list of tactics

/-

  The following follows Lean series on writing tactics

  https://www.vladasedlacek.cz/en/posts/lean-02-demo

-/

class 
incidence_geometry: Type (max (max (u1 + 1) (u2 + 1)) (u3 + 1))
incidence_geometry
:= (
point: [self : incidence_geometry] β†’ Type u1
point
:
Type u1: Type (u1 + 1)
Type u1
) (
line: [self : incidence_geometry] β†’ Type u2
line
:
Type u2: Type (u2 + 1)
Type u2
) (
circle: [self : incidence_geometry] β†’ Type u3
circle
:
Type u3: Type (u3 + 1)
Type u3
) (
length: [self : incidence_geometry] β†’ incidence_geometry.point β†’ incidence_geometry.point β†’ ℝ
length
:
point: Type u1
point
β†’
point: Type u1
point
β†’
ℝ: Type
ℝ
) (
B: [self : incidence_geometry] β†’ incidence_geometry.point β†’ incidence_geometry.point β†’ incidence_geometry.point β†’ Prop
B
:
point: Type u1
point
β†’
point: Type u1
point
β†’
point: Type u1
point
β†’
Prop: Type
Prop
) -- Betweenness (
length_nonneg: βˆ€ [self : incidence_geometry] (a b : incidence_geometry.point), 0 ≀ incidence_geometry.length a b
length_nonneg
: βˆ€ (
a: point
a
b: point
b
:
point: Type u1
point
),
0: ℝ
0
≀
length: point β†’ point β†’ ℝ
length
a: point
a
b: point
b
) (
length_symm: βˆ€ [self : incidence_geometry] (a b : incidence_geometry.point), incidence_geometry.length a b = incidence_geometry.length b a
length_symm
: βˆ€ (
a: point
a
b: point
b
:
point: Type u1
point
),
length: point β†’ point β†’ ℝ
length
a: point
a
b: point
b
=
length: point β†’ point β†’ ℝ
length
b: point
b
a: point
a
) (
length_eq_zero_iff: βˆ€ [self : incidence_geometry] {a b : incidence_geometry.point}, incidence_geometry.length a b = 0 ↔ a = b
length_eq_zero_iff
: βˆ€ {
a: point
a
b: point
b
:
point: Type u1
point
},
length: point β†’ point β†’ ℝ
length
a: point
a
b: point
b
=
0: ℝ
0
↔
a: point
a
=
b: point
b
) (
length_sum_of_B: βˆ€ [self : incidence_geometry] {a b c : incidence_geometry.point}, incidence_geometry.B a b c β†’ incidence_geometry.length a b + incidence_geometry.length b c = incidence_geometry.length a c
length_sum_of_B
: βˆ€ {
a: point
a
b: point
b
c: point
c
:
point: Type u1
point
},
B: point β†’ point β†’ point β†’ Prop
B
a: point
a
b: point
b
c: point
c
β†’
length: point β†’ point β†’ ℝ
length
a: point
a
b: point
b
+
length: point β†’ point β†’ ℝ
length
b: point
b
c: point
c
=
length: point β†’ point β†’ ℝ
length
a: point
a
c: point
c
) (
ne_12_of_B: βˆ€ [self : incidence_geometry] {a b c : incidence_geometry.point}, incidence_geometry.B a b c β†’ a β‰  b
ne_12_of_B
: βˆ€ {
a: point
a
b: point
b
c: point
c
:
point: Type u1
point
},
B: point β†’ point β†’ point β†’ Prop
B
a: point
a
b: point
b
c: point
c
β†’
a: point
a
β‰ 
b: point
b
) (
ne_13_of_B: βˆ€ [self : incidence_geometry] {a b c : incidence_geometry.point}, incidence_geometry.B a b c β†’ a β‰  c
ne_13_of_B
: βˆ€ {
a: point
a
b: point
b
c: point
c
:
point: Type u1
point
},
B: point β†’ point β†’ point β†’ Prop
B
a: point
a
b: point
b
c: point
c
β†’
a: point
a
β‰ 
c: point
c
) (
ne_23_of_B: βˆ€ [self : incidence_geometry] {a b c : incidence_geometry.point}, incidence_geometry.B a b c β†’ b β‰  c
ne_23_of_B
: βˆ€ {
a: point
a
b: point
b
c: point
c
:
point: Type u1
point
},
B: point β†’ point β†’ point β†’ Prop
B
a: point
a
b: point
b
c: point
c
β†’
b: point
b
β‰ 
c: point
c
) variable [
i: incidence_geometry
i
:
incidence_geometry: Type (max (max (u_1 + 1) (u_2 + 1)) (u_3 + 1))
incidence_geometry
] open incidence_geometry lemma
len_pos_of_neq₁: βˆ€ [i : incidence_geometry] {a b : point}, a β‰  b β†’ 0 < length a b
len_pos_of_neq₁
(
ab: a β‰  b
ab
:
a: point
a
β‰ 
b: point
b
) :
0: ℝ
0
<
length: [self : incidence_geometry] β†’ point β†’ point β†’ ℝ
length
a: point
a
b: point
b
:=

Goals accomplished! πŸ™
i: incidence_geometry
a, b: point
ab: a β‰  b

0 < length a b

Goals accomplished! πŸ™
i: incidence_geometry
a, b: point
ab: a β‰  b
h: length a b = 0

False
i: incidence_geometry
a, b: point
ab: a β‰  b
h: length a b = 0

False
i: incidence_geometry
a, b: point
ab: a β‰  b
h: a = b

False
i: incidence_geometry
a, b: point
ab: a β‰  b
h: a = b

False
i: incidence_geometry
a, b: point
ab: a β‰  b
h: a = b

False

Goals accomplished! πŸ™
i: incidence_geometry
a, b: point
ab: a β‰  b
h₁: length a b β‰  0
hβ‚‚: 0 ≀ length a b

0 < length a b

Goals accomplished! πŸ™
-- #find |- ?a β‰  ?b lemma len_pos_of_neqβ‚‚ (ab : a β‰  b) : 0 < length a b :=

Goals accomplished! πŸ™
i: incidence_geometry
a, b: point
ab: a β‰  b
h1: length a b β‰  0

0 < length a b
i: incidence_geometry
a, b: point
ab: a β‰  b
h1: length a b β‰  0
h2: 0 ≀ length a b

0 < length a b

Goals accomplished! πŸ™
lemma
len_pos_of_neq₃: βˆ€ [i : incidence_geometry] {a b : point}, a β‰  b β†’ 0 < length a b
len_pos_of_neq₃
(
ab: a β‰  b
ab
:
a: point
a
β‰ 
b: point
b
) :
0: ℝ
0
<
length: [self : incidence_geometry] β†’ point β†’ point β†’ ℝ
length
a: point
a
b: point
b
:=

Goals accomplished! πŸ™
i: incidence_geometry
a, b: point
ab: a β‰  b
h1: length a b β‰  0

0 < length a b
i: incidence_geometry
a, b: point
ab: a β‰  b
h1: length a b β‰  0
h2: 0 ≀ length a b

0 < length a b

Goals accomplished! πŸ™
lemma
len_pos_of_neqβ‚„: βˆ€ [i : incidence_geometry] {a b : point}, a β‰  b β†’ 0 < length a b
len_pos_of_neqβ‚„
(
ab: a β‰  b
ab
:
a: point
a
β‰ 
b: point
b
) :
0: ℝ
0
<
length: [self : incidence_geometry] β†’ point β†’ point β†’ ℝ
length
a: point
a
b: point
b
:=

Goals accomplished! πŸ™
i: incidence_geometry
a, b: point
ab: a β‰  b
h1: length a b β‰  0

0 < length a b
i: incidence_geometry
a, b: point
ab: a β‰  b
h1: length a b β‰  0
h2: 0 ≀ length a b

0 < length a b

Goals accomplished! πŸ™
lemma
len_pos_of_neq: βˆ€ {a b : point}, a β‰  b β†’ 0 < length a b
len_pos_of_neq
(
ab: a β‰  b
ab
:
a: point
a
β‰ 
b: point
b
) :
0: ℝ
0
<
length: [self : incidence_geometry] β†’ point β†’ point β†’ ℝ
length
a: point
a
b: point
b
:=
len_pos_of_neqβ‚‚: βˆ€ [i : incidence_geometry] {a b : point}, a β‰  b β†’ 0 < length a b
len_pos_of_neqβ‚‚
ab: a β‰  b
ab
theorem
length_sum_perm_of_B₁: βˆ€ {a b c : point}, B a b c β†’ 0 < length a b ∧ 0 < length b a
length_sum_perm_of_B₁
(
Babc: B a b c
Babc
:
B: [self : incidence_geometry] β†’ point β†’ point β†’ point β†’ Prop
B
a: point
a
b: point
b
c: point
c
) :
0: ℝ
0
<
length: [self : incidence_geometry] β†’ point β†’ point β†’ ℝ
length
a: point
a
b: point
b
∧
0: ℝ
0
<
length: [self : incidence_geometry] β†’ point β†’ point β†’ ℝ
length
b: point
b
a: point
a
:=

Goals accomplished! πŸ™
i: incidence_geometry
a, b, c: point
Babc: B a b c
ab: a β‰  b

0 < length a b ∧ 0 < length b a
i: incidence_geometry
a, b, c: point
Babc: B a b c
ab: a β‰  b
ab_pos: 0 < length a b

0 < length a b ∧ 0 < length b a
i: incidence_geometry
a, b, c: point
Babc: B a b c
ab: a β‰  b
ab_pos: 0 < length a b

left
0 < length a b
i: incidence_geometry
a, b, c: point
Babc: B a b c
ab: a β‰  b
ab_pos: 0 < length a b
0 < length b a
i: incidence_geometry
a, b, c: point
Babc: B a b c
ab: a β‰  b
ab_pos: 0 < length a b

left
0 < length a b

Goals accomplished! πŸ™
i: incidence_geometry
a, b, c: point
Babc: B a b c
ab: a β‰  b
ab_pos: 0 < length a b

right
0 < length b a
i: incidence_geometry
a, b, c: point
Babc: B a b c
ab: a β‰  b
ab_pos: 0 < length a b

right
0 < length b a
i: incidence_geometry
a, b, c: point
Babc: B a b c
ab: a β‰  b
ab_pos: 0 < length b a

right
0 < length b a
i: incidence_geometry
a, b, c: point
Babc: B a b c
ab: a β‰  b
ab_pos: 0 < length b a

right
0 < length b a
i: incidence_geometry
a, b, c: point
Babc: B a b c
ab: a β‰  b
ab_pos: 0 < length b a

right
0 < length b a

Goals accomplished! πŸ™
theorem
length_sum_perm_of_Bβ‚‚: βˆ€ {a b c : point}, B a b c β†’ 0 < length a b ∧ 0 < length b a
length_sum_perm_of_Bβ‚‚
(
Babc: B a b c
Babc
:
B: [self : incidence_geometry] β†’ point β†’ point β†’ point β†’ Prop
B
a: point
a
b: point
b
c: point
c
) :
0: ℝ
0
<
length: [self : incidence_geometry] β†’ point β†’ point β†’ ℝ
length
a: point
a
b: point
b
∧
0: ℝ
0
<
length: [self : incidence_geometry] β†’ point β†’ point β†’ ℝ
length
b: point
b
a: point
a
:=

Goals accomplished! πŸ™
i: incidence_geometry
a, b, c: point
Babc: B a b c

left
0 < length a b
i: incidence_geometry
a, b, c: point
Babc: B a b c
0 < length b a
i: incidence_geometry
a, b, c: point
Babc: B a b c

left
0 < length a b

Goals accomplished! πŸ™
i: incidence_geometry
a, b, c: point
Babc: B a b c

right
0 < length b a

Goals accomplished! πŸ™
theorem
length_sum_perm_of_B₃: βˆ€ [i : incidence_geometry] {a b c : point}, B a b c β†’ 0 < length a b ∧ 0 < length b a
length_sum_perm_of_B₃
(
Babc: B a b c
Babc
:
B: [self : incidence_geometry] β†’ point β†’ point β†’ point β†’ Prop
B
a: point
a
b: point
b
c: point
c
) :
0: ℝ
0
<
length: [self : incidence_geometry] β†’ point β†’ point β†’ ℝ
length
a: point
a
b: point
b
∧
0: ℝ
0
<
length: [self : incidence_geometry] β†’ point β†’ point β†’ ℝ
length
b: point
b
a: point
a
:=

Goals accomplished! πŸ™
i: incidence_geometry
a, b, c: point
Babc: B a b c

0 < length a b

Goals accomplished! πŸ™