url
stringclasses
147 values
commit
stringclasses
147 values
file_path
stringlengths
7
101
full_name
stringlengths
1
94
start
stringlengths
6
10
end
stringlengths
6
11
tactic
stringlengths
1
11.2k
state_before
stringlengths
3
2.09M
state_after
stringlengths
6
2.09M
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/vector_spaces.lean
rot_add_assoc
[134, 1]
[144, 4]
intros a b c
⊢ ∀ (a b c : Rotation), a + b + c = a + (b + c)
a b c : Rotation ⊢ a + b + c = a + (b + c)
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/vector_spaces.lean
rot_add_assoc
[134, 1]
[144, 4]
cases a
a b c : Rotation ⊢ a + b + c = a + (b + c)
case r0 b c : Rotation ⊢ r0 + b + c = r0 + (b + c) case r120 b c : Rotation ⊢ r120 + b + c = r120 + (b + c) case r240 b c : Rotation ⊢ r240 + b + c = r240 + (b + c)
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/vector_spaces.lean
rot_add_assoc
[134, 1]
[144, 4]
repeat { cases b repeat { cases c repeat { rfl } } }
case r0 b c : Rotation ⊢ r0 + b + c = r0 + (b + c) case r120 b c : Rotation ⊢ r120 + b + c = r120 + (b + c) case r240 b c : Rotation ⊢ r240 + b + c = r240 + (b + c)
no goals
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/vector_spaces.lean
rot_add_assoc
[134, 1]
[144, 4]
cases b
case r240 b c : Rotation ⊢ r240 + b + c = r240 + (b + c)
case r240.r0 c : Rotation ⊢ r240 + r0 + c = r240 + (r0 + c) case r240.r120 c : Rotation ⊢ r240 + r120 + c = r240 + (r120 + c) case r240.r240 c : Rotation ⊢ r240 + r240 + c = r240 + (r240 + c)
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/vector_spaces.lean
rot_add_assoc
[134, 1]
[144, 4]
repeat { cases c repeat { rfl } }
case r240.r0 c : Rotation ⊢ r240 + r0 + c = r240 + (r0 + c) case r240.r120 c : Rotation ⊢ r240 + r120 + c = r240 + (r120 + c) case r240.r240 c : Rotation ⊢ r240 + r240 + c = r240 + (r240 + c)
no goals
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/vector_spaces.lean
rot_add_assoc
[134, 1]
[144, 4]
cases c
case r240.r240 c : Rotation ⊢ r240 + r240 + c = r240 + (r240 + c)
case r240.r240.r0 ⊢ r240 + r240 + r0 = r240 + (r240 + r0) case r240.r240.r120 ⊢ r240 + r240 + r120 = r240 + (r240 + r120) case r240.r240.r240 ⊢ r240 + r240 + r240 = r240 + (r240 + r240)
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/vector_spaces.lean
rot_add_assoc
[134, 1]
[144, 4]
repeat { rfl }
case r240.r240.r0 ⊢ r240 + r240 + r0 = r240 + (r240 + r0) case r240.r240.r120 ⊢ r240 + r240 + r120 = r240 + (r240 + r120) case r240.r240.r240 ⊢ r240 + r240 + r240 = r240 + (r240 + r240)
no goals
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/vector_spaces.lean
rot_add_assoc
[134, 1]
[144, 4]
rfl
case r240.r240.r240 ⊢ r240 + r240 + r240 = r240 + (r240 + r240)
no goals
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/vector_spaces.lean
rot_zero_add
[157, 1]
[161, 17]
intro a
⊢ ∀ (a : Rotation), 0 + a = a
a : Rotation ⊢ 0 + a = a
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/vector_spaces.lean
rot_zero_add
[157, 1]
[161, 17]
cases a
a : Rotation ⊢ 0 + a = a
case r0 ⊢ 0 + r0 = r0 case r120 ⊢ 0 + r120 = r120 case r240 ⊢ 0 + r240 = r240
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/vector_spaces.lean
rot_zero_add
[157, 1]
[161, 17]
repeat { rfl }
case r0 ⊢ 0 + r0 = r0 case r120 ⊢ 0 + r120 = r120 case r240 ⊢ 0 + r240 = r240
no goals
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/vector_spaces.lean
rot_zero_add
[157, 1]
[161, 17]
rfl
case r240 ⊢ 0 + r240 = r240
no goals
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/vector_spaces.lean
rot_add_zero
[163, 1]
[167, 17]
intro a
⊢ ∀ (a : Rotation), a + 0 = a
a : Rotation ⊢ a + 0 = a
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/vector_spaces.lean
rot_add_zero
[163, 1]
[167, 17]
cases a
a : Rotation ⊢ a + 0 = a
case r0 ⊢ r0 + 0 = r0 case r120 ⊢ r120 + 0 = r120 case r240 ⊢ r240 + 0 = r240
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/vector_spaces.lean
rot_add_zero
[163, 1]
[167, 17]
repeat { rfl }
case r0 ⊢ r0 + 0 = r0 case r120 ⊢ r120 + 0 = r120 case r240 ⊢ r240 + 0 = r240
no goals
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/vector_spaces.lean
rot_add_zero
[163, 1]
[167, 17]
rfl
case r240 ⊢ r240 + 0 = r240
no goals
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/vector_spaces.lean
rot_zero_vadd
[219, 1]
[223, 17]
intro p
⊢ ∀ (p : State), 0 +ᵥ p = p
p : State ⊢ 0 +ᵥ p = p
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/vector_spaces.lean
rot_zero_vadd
[219, 1]
[223, 17]
cases p
p : State ⊢ 0 +ᵥ p = p
case heading h✝ : K unit✝ : ℕ ⊢ 0 +ᵥ heading h✝ unit✝ = heading h✝ unit✝
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/vector_spaces.lean
rot_zero_vadd
[219, 1]
[223, 17]
repeat { rfl }
case heading h✝ : K unit✝ : ℕ ⊢ 0 +ᵥ heading h✝ unit✝ = heading h✝ unit✝
no goals
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/vector_spaces.lean
rot_zero_vadd
[219, 1]
[223, 17]
rfl
case heading h✝ : K unit✝ : ℕ ⊢ 0 +ᵥ heading h✝ unit✝ = heading h✝ unit✝
no goals
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/vector_spaces.lean
rot_add_vadd
[225, 1]
[235, 4]
intros g₁ g₂ p
⊢ ∀ (g₁ g₂ : Rotation) (p : State), g₁ + g₂ +ᵥ p = g₁ +ᵥ (g₂ +ᵥ p)
g₁ g₂ : Rotation p : State ⊢ g₁ + g₂ +ᵥ p = g₁ +ᵥ (g₂ +ᵥ p)
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/vector_spaces.lean
rot_add_vadd
[225, 1]
[235, 4]
cases g₁
g₁ g₂ : Rotation p : State ⊢ g₁ + g₂ +ᵥ p = g₁ +ᵥ (g₂ +ᵥ p)
case r0 g₂ : Rotation p : State ⊢ r0 + g₂ +ᵥ p = r0 +ᵥ (g₂ +ᵥ p) case r120 g₂ : Rotation p : State ⊢ r120 + g₂ +ᵥ p = r120 +ᵥ (g₂ +ᵥ p) case r240 g₂ : Rotation p : State ⊢ r240 + g₂ +ᵥ p = r240 +ᵥ (g₂ +ᵥ p)
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/vector_spaces.lean
rot_add_vadd
[225, 1]
[235, 4]
repeat { cases g₂ repeat { cases p repeat rfl } }
case r0 g₂ : Rotation p : State ⊢ r0 + g₂ +ᵥ p = r0 +ᵥ (g₂ +ᵥ p) case r120 g₂ : Rotation p : State ⊢ r120 + g₂ +ᵥ p = r120 +ᵥ (g₂ +ᵥ p) case r240 g₂ : Rotation p : State ⊢ r240 + g₂ +ᵥ p = r240 +ᵥ (g₂ +ᵥ p)
case r120 g₂ : Rotation p : State ⊢ r120 + g₂ +ᵥ p = r120 +ᵥ (g₂ +ᵥ p) case r240 g₂ : Rotation p : State ⊢ r240 + g₂ +ᵥ p = r240 +ᵥ (g₂ +ᵥ p)
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/vector_spaces.lean
rot_add_vadd
[225, 1]
[235, 4]
cases g₂
case r120 g₂ : Rotation p : State ⊢ r120 + g₂ +ᵥ p = r120 +ᵥ (g₂ +ᵥ p)
case r120.r0 p : State ⊢ r120 + r0 +ᵥ p = r120 +ᵥ (r0 +ᵥ p) case r120.r120 p : State ⊢ r120 + r120 +ᵥ p = r120 +ᵥ (r120 +ᵥ p) case r120.r240 p : State ⊢ r120 + r240 +ᵥ p = r120 +ᵥ (r240 +ᵥ p)
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/vector_spaces.lean
rot_add_vadd
[225, 1]
[235, 4]
repeat { cases p repeat rfl }
case r120.r0 p : State ⊢ r120 + r0 +ᵥ p = r120 +ᵥ (r0 +ᵥ p) case r120.r120 p : State ⊢ r120 + r120 +ᵥ p = r120 +ᵥ (r120 +ᵥ p) case r120.r240 p : State ⊢ r120 + r240 +ᵥ p = r120 +ᵥ (r240 +ᵥ p)
case r120.r240 p : State ⊢ r120 + r240 +ᵥ p = r120 +ᵥ (r240 +ᵥ p)
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/vector_spaces.lean
rot_add_vadd
[225, 1]
[235, 4]
cases p
case r120.r240 p : State ⊢ r120 + r240 +ᵥ p = r120 +ᵥ (r240 +ᵥ p)
case r120.r240.heading h✝ : K unit✝ : ℕ ⊢ r120 + r240 +ᵥ heading h✝ unit✝ = r120 +ᵥ (r240 +ᵥ heading h✝ unit✝)
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/vector_spaces.lean
rot_add_vadd
[225, 1]
[235, 4]
repeat rfl
case r120.r120.heading h✝ : K unit✝ : ℕ ⊢ r120 + r120 +ᵥ heading h✝ unit✝ = r120 +ᵥ (r120 +ᵥ heading h✝ unit✝)
no goals
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/vector_spaces.lean
rot_add_vadd
[225, 1]
[235, 4]
rfl
case r120.r120.heading h✝ : K unit✝ : ℕ ⊢ r120 + r120 +ᵥ heading h✝ unit✝ = r120 +ᵥ (r120 +ᵥ heading h✝ unit✝)
no goals
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/vector_spaces.lean
rot_add_neg_left
[349, 1]
[353, 17]
intro a
⊢ ∀ (a : Rotation), -a + a = 0
a : Rotation ⊢ -a + a = 0
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/vector_spaces.lean
rot_add_neg_left
[349, 1]
[353, 17]
cases a
a : Rotation ⊢ -a + a = 0
case r0 ⊢ -r0 + r0 = 0 case r120 ⊢ -r120 + r120 = 0 case r240 ⊢ -r240 + r240 = 0
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/vector_spaces.lean
rot_add_neg_left
[349, 1]
[353, 17]
repeat { rfl }
case r0 ⊢ -r0 + r0 = 0 case r120 ⊢ -r120 + r120 = 0 case r240 ⊢ -r240 + r240 = 0
no goals
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/vector_spaces.lean
rot_add_neg_left
[349, 1]
[353, 17]
rfl
case r240 ⊢ -r240 + r240 = 0
no goals
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/vector_spaces.lean
rot_state_vsub_vadd'
[405, 1]
[412, 4]
intro p1 p2
⊢ ∀ (p1 p2 : State), p1 -ᵥ p2 +ᵥ p2 = p1
p1 p2 : State ⊢ p1 -ᵥ p2 +ᵥ p2 = p1
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/vector_spaces.lean
rot_state_vsub_vadd'
[405, 1]
[412, 4]
cases p1
p1 p2 : State ⊢ p1 -ᵥ p2 +ᵥ p2 = p1
case heading p2 : State h✝ : K unit✝ : ℕ ⊢ heading h✝ unit✝ -ᵥ p2 +ᵥ p2 = heading h✝ unit✝
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/vector_spaces.lean
rot_state_vsub_vadd'
[405, 1]
[412, 4]
cases p2
case heading p2 : State h✝ : K unit✝ : ℕ ⊢ heading h✝ unit✝ -ᵥ p2 +ᵥ p2 = heading h✝ unit✝
case heading.heading h✝¹ : K unit✝¹ : ℕ h✝ : K unit✝ : ℕ ⊢ heading h✝¹ unit✝¹ -ᵥ heading h✝ unit✝ +ᵥ heading h✝ unit✝ = heading h✝¹ unit✝¹
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/vector_spaces.lean
rot_state_vadd_vsub'
[414, 1]
[421, 4]
intros g p
⊢ ∀ (g : Rotation) (p : State), g +ᵥ p -ᵥ p = g
g : Rotation p : State ⊢ g +ᵥ p -ᵥ p = g
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/vector_spaces.lean
rot_state_vadd_vsub'
[414, 1]
[421, 4]
cases g
g : Rotation p : State ⊢ g +ᵥ p -ᵥ p = g
case r0 p : State ⊢ r0 +ᵥ p -ᵥ p = r0 case r120 p : State ⊢ r120 +ᵥ p -ᵥ p = r120 case r240 p : State ⊢ r240 +ᵥ p -ᵥ p = r240
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/vector_spaces.lean
rot_state_vadd_vsub'
[414, 1]
[421, 4]
cases p
case r0 p : State ⊢ r0 +ᵥ p -ᵥ p = r0
case r0.heading h✝ : K unit✝ : ℕ ⊢ r0 +ᵥ heading h✝ unit✝ -ᵥ heading h✝ unit✝ = r0
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/sets_relations.lean
eq_nat_is_refl
[68, 1]
[71, 12]
unfold Reflexive
⊢ Reflexive Eq
⊢ ∀ (x : ℕ), x = x
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/sets_relations.lean
eq_nat_is_refl
[68, 1]
[71, 12]
intro x
⊢ ∀ (x : ℕ), x = x
x : ℕ ⊢ x = x
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/sets_relations.lean
eq_nat_is_refl
[68, 1]
[71, 12]
exact rfl
x : ℕ ⊢ x = x
no goals
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/sets_relations.lean
eq_nat_is_symm
[73, 1]
[77, 11]
unfold Symmetric
⊢ Symmetric Eq
⊢ ∀ ⦃x y : ℕ⦄, x = y → y = x
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/sets_relations.lean
eq_nat_is_symm
[73, 1]
[77, 11]
intro x y
⊢ ∀ ⦃x y : ℕ⦄, x = y → y = x
x y : ℕ ⊢ x = y → y = x
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/sets_relations.lean
eq_nat_is_symm
[73, 1]
[77, 11]
intro hxy
x y : ℕ ⊢ x = y → y = x
x y : ℕ hxy : x = y ⊢ y = x
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/sets_relations.lean
eq_nat_is_symm
[73, 1]
[77, 11]
rw [hxy]
x y : ℕ hxy : x = y ⊢ y = x
no goals
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/sets_relations.lean
eq_nat_is_trans
[82, 1]
[87, 9]
unfold Transitive
⊢ Transitive Eq
⊢ ∀ ⦃x y z : ℕ⦄, x = y → y = z → x = z
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/sets_relations.lean
eq_nat_is_trans
[82, 1]
[87, 9]
intros x y z
⊢ ∀ ⦃x y z : ℕ⦄, x = y → y = z → x = z
x y z : ℕ ⊢ x = y → y = z → x = z
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/sets_relations.lean
eq_nat_is_trans
[82, 1]
[87, 9]
intros hxy hyz
x y z : ℕ ⊢ x = y → y = z → x = z
x y z : ℕ hxy : x = y hyz : y = z ⊢ x = z
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/sets_relations.lean
eq_nat_is_trans
[82, 1]
[87, 9]
rw [hxy]
x y z : ℕ hxy : x = y hyz : y = z ⊢ x = z
x y z : ℕ hxy : x = y hyz : y = z ⊢ y = z
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/sets_relations.lean
eq_nat_is_trans
[82, 1]
[87, 9]
rw [hyz]
x y z : ℕ hxy : x = y hyz : y = z ⊢ y = z
no goals
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/sets_relations.lean
cong_mod_n_equiv'
[99, 1]
[102, 31]
intro n
⊢ ∀ (n : ℕ), Equivalence (cong_mod_n n)
n : ℕ ⊢ Equivalence (cong_mod_n n)
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/sets_relations.lean
cong_mod_n_rfl
[106, 1]
[111, 12]
intro n
⊢ ∀ (n : ℕ), Reflexive (cong_mod_n n)
n : ℕ ⊢ Reflexive (cong_mod_n n)
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/sets_relations.lean
cong_mod_n_rfl
[106, 1]
[111, 12]
unfold cong_mod_n
n : ℕ ⊢ Reflexive (cong_mod_n n)
n : ℕ ⊢ Reflexive fun a b => a % n = b % n
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/sets_relations.lean
cong_mod_n_rfl
[106, 1]
[111, 12]
unfold Reflexive
n : ℕ ⊢ Reflexive fun a b => a % n = b % n
n : ℕ ⊢ ∀ (x : ℕ), (fun a b => a % n = b % n) x x
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/sets_relations.lean
cong_mod_n_rfl
[106, 1]
[111, 12]
intro a
n : ℕ ⊢ ∀ (x : ℕ), (fun a b => a % n = b % n) x x
n a : ℕ ⊢ a % n = a % n
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/sets_relations.lean
cong_mod_n_rfl
[106, 1]
[111, 12]
exact rfl
n a : ℕ ⊢ a % n = a % n
no goals
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/sets_relations.lean
cong_mod_n_symm
[113, 1]
[120, 11]
intro n
⊢ ∀ (n : ℕ), Symmetric (cong_mod_n n)
n : ℕ ⊢ Symmetric (cong_mod_n n)
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/sets_relations.lean
cong_mod_n_symm
[113, 1]
[120, 11]
unfold Symmetric
n : ℕ ⊢ Symmetric (cong_mod_n n)
n : ℕ ⊢ ∀ ⦃x y : ℕ⦄, cong_mod_n n x y → cong_mod_n n y x
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/sets_relations.lean
cong_mod_n_symm
[113, 1]
[120, 11]
intros x y
n : ℕ ⊢ ∀ ⦃x y : ℕ⦄, cong_mod_n n x y → cong_mod_n n y x
n x y : ℕ ⊢ cong_mod_n n x y → cong_mod_n n y x
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/sets_relations.lean
cong_mod_n_symm
[113, 1]
[120, 11]
intro hxy
n x y : ℕ ⊢ cong_mod_n n x y → cong_mod_n n y x
n x y : ℕ hxy : cong_mod_n n x y ⊢ cong_mod_n n y x
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/sets_relations.lean
cong_mod_n_symm
[113, 1]
[120, 11]
unfold cong_mod_n
n x y : ℕ hxy : cong_mod_n n x y ⊢ cong_mod_n n y x
n x y : ℕ hxy : cong_mod_n n x y ⊢ y % n = x % n
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/sets_relations.lean
cong_mod_n_symm
[113, 1]
[120, 11]
unfold cong_mod_n at hxy
n x y : ℕ hxy : cong_mod_n n x y ⊢ y % n = x % n
n x y : ℕ hxy : x % n = y % n ⊢ y % n = x % n
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/sets_relations.lean
cong_mod_n_symm
[113, 1]
[120, 11]
rw [hxy]
n x y : ℕ hxy : x % n = y % n ⊢ y % n = x % n
no goals
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/sets_relations.lean
cong_mod_trans
[122, 1]
[126, 16]
intro n a b c hab hbc
⊢ ∀ (n : ℕ), Transitive (cong_mod_n n)
n a b c : ℕ hab : cong_mod_n n a b hbc : cong_mod_n n b c ⊢ cong_mod_n n a c
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/sets_relations.lean
cong_mod_trans
[122, 1]
[126, 16]
unfold cong_mod_n
n a b c : ℕ hab : cong_mod_n n a b hbc : cong_mod_n n b c ⊢ cong_mod_n n a c
n a b c : ℕ hab : cong_mod_n n a b hbc : cong_mod_n n b c ⊢ a % n = c % n
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/sets_relations.lean
cong_mod_trans
[122, 1]
[126, 16]
unfold cong_mod_n at hab hbc
n a b c : ℕ hab : cong_mod_n n a b hbc : cong_mod_n n b c ⊢ a % n = c % n
n a b c : ℕ hab : a % n = b % n hbc : b % n = c % n ⊢ a % n = c % n
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/sets_relations.lean
cong_mod_trans
[122, 1]
[126, 16]
rw [hab, hbc]
n a b c : ℕ hab : a % n = b % n hbc : b % n = c % n ⊢ a % n = c % n
no goals
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/sets_relations.lean
cong_mod_n_equiv
[128, 1]
[135, 47]
intro n
⊢ ∀ (n : ℕ), Equivalence (cong_mod_n n)
n : ℕ ⊢ Equivalence (cong_mod_n n)
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/sets_relations.lean
cong_mod_n_equiv
[128, 1]
[135, 47]
unfold cong_mod_n
n : ℕ ⊢ Equivalence (cong_mod_n n)
n : ℕ ⊢ Equivalence fun a b => a % n = b % n
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/sets_relations.lean
cong_mod_n_equiv
[128, 1]
[135, 47]
exact Equivalence.mk (by intro x; rfl) (by intros x y h; rw [h]) (by intros x y z hxy hyz; rw [hxy, hyz])
n : ℕ ⊢ Equivalence fun a b => a % n = b % n
no goals
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/sets_relations.lean
cong_mod_n_equiv
[128, 1]
[135, 47]
intro x
n : ℕ ⊢ ∀ (x : ℕ), x % n = x % n
n x : ℕ ⊢ x % n = x % n
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/sets_relations.lean
cong_mod_n_equiv
[128, 1]
[135, 47]
rfl
n x : ℕ ⊢ x % n = x % n
no goals
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/sets_relations.lean
cong_mod_n_equiv
[128, 1]
[135, 47]
intros x y h
n : ℕ ⊢ ∀ {x y : ℕ}, x % n = y % n → y % n = x % n
n x y : ℕ h : x % n = y % n ⊢ y % n = x % n
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/sets_relations.lean
cong_mod_n_equiv
[128, 1]
[135, 47]
rw [h]
n x y : ℕ h : x % n = y % n ⊢ y % n = x % n
no goals
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/sets_relations.lean
cong_mod_n_equiv
[128, 1]
[135, 47]
intros x y z hxy hyz
n : ℕ ⊢ ∀ {x y z : ℕ}, x % n = y % n → y % n = z % n → x % n = z % n
n x y z : ℕ hxy : x % n = y % n hyz : y % n = z % n ⊢ x % n = z % n
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/sets_relations.lean
cong_mod_n_equiv
[128, 1]
[135, 47]
rw [hxy, hyz]
n x y z : ℕ hxy : x % n = y % n hyz : y % n = z % n ⊢ x % n = z % n
no goals
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/sets_relations.lean
succ_inj
[189, 1]
[193, 13]
unfold Injective
⊢ Injective fun n => n + 1
⊢ ∀ ⦃a₁ a₂ : ℕ⦄, (fun n => n + 1) a₁ = (fun n => n + 1) a₂ → a₁ = a₂
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/sets_relations.lean
succ_inj
[189, 1]
[193, 13]
intros a1 a2 h
⊢ ∀ ⦃a₁ a₂ : ℕ⦄, (fun n => n + 1) a₁ = (fun n => n + 1) a₂ → a₁ = a₂
a1 a2 : ℕ h : (fun n => n + 1) a1 = (fun n => n + 1) a2 ⊢ a1 = a2
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/sets_relations.lean
succ_inj
[189, 1]
[193, 13]
simp [Nat.add] at h
a1 a2 : ℕ h : (fun n => n + 1) a1 = (fun n => n + 1) a2 ⊢ a1 = a2
a1 a2 : ℕ h : a1 = a2 ⊢ a1 = a2
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/sets_relations.lean
succ_inj
[189, 1]
[193, 13]
assumption
a1 a2 : ℕ h : a1 = a2 ⊢ a1 = a2
no goals
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/sets_relations.lean
not_succ_surj
[196, 1]
[200, 27]
unfold Surjective
⊢ ¬Surjective fun n => n + 1
⊢ ¬∀ (b : ℕ), ∃ a, (fun n => n + 1) a = b
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/sets_relations.lean
not_succ_surj
[196, 1]
[200, 27]
intro h
⊢ ¬∀ (b : ℕ), ∃ a, (fun n => n + 1) a = b
h : ∀ (b : ℕ), ∃ a, (fun n => n + 1) a = b ⊢ False
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/sets_relations.lean
not_succ_surj
[196, 1]
[200, 27]
let contra := h 0
h : ∀ (b : ℕ), ∃ a, (fun n => n + 1) a = b ⊢ False
h : ∀ (b : ℕ), ∃ a, (fun n => n + 1) a = b contra : ∃ a, (fun n => n + 1) a = 0 := h 0 ⊢ False
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/sets_relations.lean
not_succ_surj
[196, 1]
[200, 27]
simp [Nat.add] at contra
h : ∀ (b : ℕ), ∃ a, (fun n => n + 1) a = b contra : ∃ a, (fun n => n + 1) a = 0 := h 0 ⊢ False
no goals
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/sets_relations.lean
inj_not
[204, 1]
[215, 25]
unfold Injective
⊢ Injective Bool.not
⊢ ∀ ⦃a₁ a₂ : Bool⦄, Bool.not a₁ = Bool.not a₂ → a₁ = a₂
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/sets_relations.lean
inj_not
[204, 1]
[215, 25]
intros a1 a2 h
⊢ ∀ ⦃a₁ a₂ : Bool⦄, Bool.not a₁ = Bool.not a₂ → a₁ = a₂
a1 a2 : Bool h : Bool.not a1 = Bool.not a2 ⊢ a1 = a2
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/sets_relations.lean
inj_not
[204, 1]
[215, 25]
cases a1 with | true => cases a2 with | true => rfl | false => nomatch h | false => cases a2 with | true => nomatch h | false => rfl
a1 a2 : Bool h : Bool.not a1 = Bool.not a2 ⊢ a1 = a2
no goals
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/sets_relations.lean
inj_not
[204, 1]
[215, 25]
cases a2 with | true => rfl | false => nomatch h
case true a2 : Bool h : Bool.not true = Bool.not a2 ⊢ true = a2
no goals
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/sets_relations.lean
inj_not
[204, 1]
[215, 25]
rfl
case true.true h : Bool.not true = Bool.not true ⊢ true = true
no goals
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/sets_relations.lean
inj_not
[204, 1]
[215, 25]
nomatch h
case true.false h : Bool.not true = Bool.not false ⊢ true = false
no goals
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/sets_relations.lean
inj_not
[204, 1]
[215, 25]
cases a2 with | true => nomatch h | false => rfl
case false a2 : Bool h : Bool.not false = Bool.not a2 ⊢ false = a2
no goals
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/sets_relations.lean
inj_not
[204, 1]
[215, 25]
nomatch h
case false.true h : Bool.not false = Bool.not true ⊢ false = true
no goals
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/sets_relations.lean
inj_not
[204, 1]
[215, 25]
rfl
case false.false h : Bool.not false = Bool.not false ⊢ false = false
no goals
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/sets_relations.lean
surj_not
[217, 1]
[222, 33]
unfold Surjective
⊢ Surjective Bool.not
⊢ ∀ (b : Bool), ∃ a, Bool.not a = b
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/sets_relations.lean
surj_not
[217, 1]
[222, 33]
intro b
⊢ ∀ (b : Bool), ∃ a, Bool.not a = b
b : Bool ⊢ ∃ a, Bool.not a = b
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/sets_relations.lean
surj_not
[217, 1]
[222, 33]
cases b with | true => exact ⟨ false, rfl ⟩ | false => exact ⟨ true, rfl ⟩
b : Bool ⊢ ∃ a, Bool.not a = b
no goals
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/sets_relations.lean
surj_not
[217, 1]
[222, 33]
exact ⟨ false, rfl ⟩
case true ⊢ ∃ a, Bool.not a = true
no goals
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/sets_relations.lean
surj_not
[217, 1]
[222, 33]
exact ⟨ true, rfl ⟩
case false ⊢ ∃ a, Bool.not a = false
no goals
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/sets_relations.lean
not_bij
[224, 1]
[226, 30]
unfold Bijective
⊢ Bijective Bool.not
⊢ Injective Bool.not ∧ Surjective Bool.not
https://github.com/kevinsullivan/cs2120f23.git
c2da7c4a6be769c6fca375a54e8c1fa31ba2854b
Instructor/Lectures/grad/sets_relations.lean
not_bij
[224, 1]
[226, 30]
exact ⟨ inj_not, surj_not ⟩
⊢ Injective Bool.not ∧ Surjective Bool.not
no goals