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/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.Int.zero_eq_mul
[136, 9]
[140, 26]
exact Int.mul_eq_zero
a b : ℤ ⊢ a * b = 0 ↔ a = 0 ∨ b = 0
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.Rat.div_two_add_div_two
[145, 9]
[157, 9]
have hxx : x + x = 2 * x := by linarith
x : ℚ ⊢ x / 2 + x / 2 = x
x : ℚ hxx : x + x = 2 * x ⊢ x / 2 + x / 2 = x
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.Rat.div_two_add_div_two
[145, 9]
[157, 9]
have hxx2 : (x + x) / 2 = (2 * x) / 2 := by rw [hxx]
x : ℚ hxx : x + x = 2 * x ⊢ x / 2 + x / 2 = x
x : ℚ hxx : x + x = 2 * x hxx2 : (x + x) / 2 = 2 * x / 2 ⊢ x / 2 + x / 2 = x
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.Rat.div_two_add_div_two
[145, 9]
[157, 9]
have hx2x2 : x / 2 + x / 2 = (2 * x) / 2 := by rw [←hxx2] rw [add_div]
x : ℚ hxx : x + x = 2 * x hxx2 : (x + x) / 2 = 2 * x / 2 ⊢ x / 2 + x / 2 = x
x : ℚ hxx : x + x = 2 * x hxx2 : (x + x) / 2 = 2 * x / 2 hx2x2 : x / 2 + x / 2 = 2 * x / 2 ⊢ x / 2 + x / 2 = x
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.Rat.div_two_add_div_two
[145, 9]
[157, 9]
rw [hx2x2]
x : ℚ hxx : x + x = 2 * x hxx2 : (x + x) / 2 = 2 * x / 2 hx2x2 : x / 2 + x / 2 = 2 * x / 2 ⊢ x / 2 + x / 2 = x
x : ℚ hxx : x + x = 2 * x hxx2 : (x + x) / 2 = 2 * x / 2 hx2x2 : x / 2 + x / 2 = 2 * x / 2 ⊢ 2 * x / 2 = x
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.Rat.div_two_add_div_two
[145, 9]
[157, 9]
ring
x : ℚ hxx : x + x = 2 * x hxx2 : (x + x) / 2 = 2 * x / 2 hx2x2 : x / 2 + x / 2 = 2 * x / 2 ⊢ 2 * x / 2 = x
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.Rat.div_two_add_div_two
[145, 9]
[157, 9]
linarith
x : ℚ ⊢ x + x = 2 * x
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.Rat.div_two_add_div_two
[145, 9]
[157, 9]
rw [hxx]
x : ℚ hxx : x + x = 2 * x ⊢ (x + x) / 2 = 2 * x / 2
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.Rat.div_two_add_div_two
[145, 9]
[157, 9]
rw [←hxx2]
x : ℚ hxx : x + x = 2 * x hxx2 : (x + x) / 2 = 2 * x / 2 ⊢ x / 2 + x / 2 = 2 * x / 2
x : ℚ hxx : x + x = 2 * x hxx2 : (x + x) / 2 = 2 * x / 2 ⊢ x / 2 + x / 2 = (x + x) / 2
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.Rat.div_two_add_div_two
[145, 9]
[157, 9]
rw [add_div]
x : ℚ hxx : x + x = 2 * x hxx2 : (x + x) / 2 = 2 * x / 2 ⊢ x / 2 + x / 2 = (x + x) / 2
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.List.count_nil
[162, 9]
[164, 9]
rfl
α : Type inst✝ : BEq α x : α ⊢ List.count x [] = 0
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.List.countp.go_accum
[166, 1]
[177, 32]
induction as generalizing acc with | nil => simp [List.countp.go, List.countp] | cons a as' ih => simp [List.countp, List.countp.go] cases Classical.em (p a) with | inl hp => simp [hp, ih] ac_rfl | inr hp => simp [hp, ih]
α : Type p : α → Bool as : List α acc : ℕ ⊢ List.countp.go p as acc = List.countp p as + acc
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.List.countp.go_accum
[166, 1]
[177, 32]
simp [List.countp.go, List.countp]
case nil α : Type p : α → Bool acc : ℕ ⊢ List.countp.go p [] acc = List.countp p [] + acc
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.List.countp.go_accum
[166, 1]
[177, 32]
simp [List.countp, List.countp.go]
case cons α : Type p : α → Bool a : α as' : List α ih : ∀ (acc : ℕ), List.countp.go p as' acc = List.countp p as' + acc acc : ℕ ⊢ List.countp.go p (a :: as') acc = List.countp p (a :: as') + acc
case cons α : Type p : α → Bool a : α as' : List α ih : ∀ (acc : ℕ), List.countp.go p as' acc = List.countp p as' + acc acc : ℕ ⊢ (bif p a then List.countp.go p as' (acc + 1) else List.countp.go p as' acc) = (bif p a then List.countp.go p as' 1 else List.countp.go p as' 0) + acc
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.List.countp.go_accum
[166, 1]
[177, 32]
cases Classical.em (p a) with | inl hp => simp [hp, ih] ac_rfl | inr hp => simp [hp, ih]
case cons α : Type p : α → Bool a : α as' : List α ih : ∀ (acc : ℕ), List.countp.go p as' acc = List.countp p as' + acc acc : ℕ ⊢ (bif p a then List.countp.go p as' (acc + 1) else List.countp.go p as' acc) = (bif p a then List.countp.go p as' 1 else List.countp.go p as' 0) + acc
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.List.countp.go_accum
[166, 1]
[177, 32]
simp [hp, ih]
case cons.inl α : Type p : α → Bool a : α as' : List α ih : ∀ (acc : ℕ), List.countp.go p as' acc = List.countp p as' + acc acc : ℕ hp : p a = true ⊢ (bif p a then List.countp.go p as' (acc + 1) else List.countp.go p as' acc) = (bif p a then List.countp.go p as' 1 else List.countp.go p as' 0) + acc
case cons.inl α : Type p : α → Bool a : α as' : List α ih : ∀ (acc : ℕ), List.countp.go p as' acc = List.countp p as' + acc acc : ℕ hp : p a = true ⊢ List.countp p as' + (acc + 1) = List.countp p as' + 1 + acc
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.List.countp.go_accum
[166, 1]
[177, 32]
ac_rfl
case cons.inl α : Type p : α → Bool a : α as' : List α ih : ∀ (acc : ℕ), List.countp.go p as' acc = List.countp p as' + acc acc : ℕ hp : p a = true ⊢ List.countp p as' + (acc + 1) = List.countp p as' + 1 + acc
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.List.countp.go_accum
[166, 1]
[177, 32]
simp [hp, ih]
case cons.inr α : Type p : α → Bool a : α as' : List α ih : ∀ (acc : ℕ), List.countp.go p as' acc = List.countp p as' + acc acc : ℕ hp : ¬p a = true ⊢ (bif p a then List.countp.go p as' (acc + 1) else List.countp.go p as' acc) = (bif p a then List.countp.go p as' 1 else List.countp.go p as' 0) + acc
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.List.count_cons
[179, 9]
[189, 16]
cases Classical.em (a == x) with | inl hx => rw [List.count, List.countp, List.countp.go, List.countp.go_accum] simp [hx] ac_rfl | inr hx => rw [List.count, List.countp, List.countp.go, List.countp] simp [hx]
α : Type inst✝ : BEq α x a : α as : List α ⊢ List.count x (a :: as) = (bif a == x then 1 else 0) + List.count x as
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.List.count_cons
[179, 9]
[189, 16]
rw [List.count, List.countp, List.countp.go, List.countp.go_accum]
case inl α : Type inst✝ : BEq α x a : α as : List α hx : (a == x) = true ⊢ List.count x (a :: as) = (bif a == x then 1 else 0) + List.count x as
case inl α : Type inst✝ : BEq α x a : α as : List α hx : (a == x) = true ⊢ (bif a == x then List.countp (fun x_1 => x_1 == x) as + (0 + 1) else List.countp.go (fun x_1 => x_1 == x) as 0) = (bif a == x then 1 else 0) + List.countp (fun x_1 => x_1 == x) as
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.List.count_cons
[179, 9]
[189, 16]
simp [hx]
case inl α : Type inst✝ : BEq α x a : α as : List α hx : (a == x) = true ⊢ (bif a == x then List.countp (fun x_1 => x_1 == x) as + (0 + 1) else List.countp.go (fun x_1 => x_1 == x) as 0) = (bif a == x then 1 else 0) + List.countp (fun x_1 => x_1 == x) as
case inl α : Type inst✝ : BEq α x a : α as : List α hx : (a == x) = true ⊢ List.countp (fun x_1 => x_1 == x) as + 1 = 1 + List.countp (fun x_1 => x_1 == x) as
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.List.count_cons
[179, 9]
[189, 16]
ac_rfl
case inl α : Type inst✝ : BEq α x a : α as : List α hx : (a == x) = true ⊢ List.countp (fun x_1 => x_1 == x) as + 1 = 1 + List.countp (fun x_1 => x_1 == x) as
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.List.count_cons
[179, 9]
[189, 16]
rw [List.count, List.countp, List.countp.go, List.countp]
case inr α : Type inst✝ : BEq α x a : α as : List α hx : ¬(a == x) = true ⊢ List.count x (a :: as) = (bif a == x then 1 else 0) + List.count x as
case inr α : Type inst✝ : BEq α x a : α as : List α hx : ¬(a == x) = true ⊢ (bif a == x then List.countp.go (fun x_1 => x_1 == x) as (0 + 1) else List.countp.go (fun x_1 => x_1 == x) as 0) = (bif a == x then 1 else 0) + List.countp.go (fun x_1 => x_1 == x) as 0
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.List.count_cons
[179, 9]
[189, 16]
simp [hx]
case inr α : Type inst✝ : BEq α x a : α as : List α hx : ¬(a == x) = true ⊢ (bif a == x then List.countp.go (fun x_1 => x_1 == x) as (0 + 1) else List.countp.go (fun x_1 => x_1 == x) as 0) = (bif a == x then 1 else 0) + List.countp.go (fun x_1 => x_1 == x) as 0
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.List.count_append
[191, 9]
[198, 13]
induction as with | nil => simp | cons a as' ih => simp [ih] ac_rfl
α : Type inst✝ : BEq α x : α as bs : List α ⊢ List.count x (as ++ bs) = List.count x as + List.count x bs
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.List.count_append
[191, 9]
[198, 13]
simp
case nil α : Type inst✝ : BEq α x : α bs : List α ⊢ List.count x ([] ++ bs) = List.count x [] + List.count x bs
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.List.count_append
[191, 9]
[198, 13]
simp [ih]
case cons α : Type inst✝ : BEq α x : α bs : List α a : α as' : List α ih : List.count x (as' ++ bs) = List.count x as' + List.count x bs ⊢ List.count x (a :: as' ++ bs) = List.count x (a :: as') + List.count x bs
case cons α : Type inst✝ : BEq α x : α bs : List α a : α as' : List α ih : List.count x (as' ++ bs) = List.count x as' + List.count x bs ⊢ (bif a == x then 1 else 0) + (List.count x as' + List.count x bs) = (bif a == x then 1 else 0) + List.count x as' + List.count x bs
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.List.count_append
[191, 9]
[198, 13]
ac_rfl
case cons α : Type inst✝ : BEq α x : α bs : List α a : α as' : List α ih : List.count x (as' ++ bs) = List.count x as' + List.count x bs ⊢ (bif a == x then 1 else 0) + (List.count x as' + List.count x bs) = (bif a == x then 1 else 0) + List.count x as' + List.count x bs
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.Set.Mem_empty
[203, 9]
[205, 69]
simp [Membership.mem, Set.Mem, EmptyCollection.emptyCollection]
α : Type a : α ⊢ a ∈ ∅ ↔ False
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.Set.compreh_False
[207, 9]
[209, 9]
rfl
α : Type ⊢ {a | False} = ∅
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.Set.subseteq_def
[211, 20]
[213, 9]
rfl
α : Type A B : Set α ⊢ A ⊆ B ↔ ∀ (a : α), a ∈ A → a ∈ B
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.Set.Mem_singleton
[215, 9]
[217, 9]
rfl
α : Type a b : α ⊢ a ∈ {b} ↔ a = b
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.Set.Mem_compreh
[219, 9]
[221, 9]
rfl
α : Type A : Set α ⊢ {a | a ∈ A} = A
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.Set.compreh_Mem
[223, 9]
[225, 9]
rfl
α : Type a : α P : α → Prop ⊢ a ∈ {a | P a} ↔ P a
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.Set.empty_union
[227, 9]
[229, 35]
simp [Union.union, Set.union]
α : Type A : Set α ⊢ ∅ ∪ A = A
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.Set.union_empty
[231, 9]
[233, 35]
simp [Union.union, Set.union]
α : Type A : Set α ⊢ A ∪ ∅ = A
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.Set.Mem_union
[235, 9]
[237, 9]
rfl
α : Type a : α A B : Set α ⊢ a ∈ A ∪ B ↔ a ∈ A ∨ a ∈ B
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.Set.unordered_pair_comm
[239, 1]
[244, 10]
apply Set.ext
α : Type a b : α ⊢ {a, b} = {b, a}
case h α : Type a b : α ⊢ ∀ (x : α), x ∈ {a, b} ↔ x ∈ {b, a}
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.Set.unordered_pair_comm
[239, 1]
[244, 10]
simp [insert, singleton, Set.insert, Set.singleton]
case h α : Type a b : α ⊢ ∀ (x : α), x ∈ {a, b} ↔ x ∈ {b, a}
case h α : Type a b : α ⊢ ∀ (x : α), x = a ∨ x = b ↔ x = b ∨ x = a
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.Set.unordered_pair_comm
[239, 1]
[244, 10]
aesop
case h α : Type a b : α ⊢ ∀ (x : α), x = a ∨ x = b ↔ x = b ∨ x = a
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.Set.le_def
[280, 9]
[282, 9]
rfl
α : Type A B : Set α ⊢ A ≤ B ↔ A ⊆ B
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.Set.lt_def
[284, 9]
[286, 9]
rfl
α : Type A B : Set α ⊢ A < B ↔ A ⊆ B ∧ A ≠ B
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.mem_Id
[298, 9]
[300, 9]
rfl
α : Type a b : α ⊢ (a, b) ∈ Id ↔ b = a
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.mem_comp
[307, 9]
[309, 9]
rfl
α : Type r₁ r₂ : Set (α × α) a b : α ⊢ (a, b) ∈ r₁ ◯ r₂ ↔ ∃ c, (a, c) ∈ r₁ ∧ (c, b) ∈ r₂
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.mem_restrict
[317, 9]
[320, 9]
rfl
α : Type r : Set (α × α) P : α → Prop a b : α ⊢ (a, b) ∈ r ⇃ P ↔ (a, b) ∈ r ∧ P a
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.RTC.trans
[331, 1]
[340, 19]
induction hbc with | refl => assumption | tail c d hbc hcd hac => apply tail <;> assumption
α : Type R : α → α → Prop a b c : α hab : RTC R a b hbc : RTC R b c ⊢ RTC R a c
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.RTC.trans
[331, 1]
[340, 19]
assumption
case refl α : Type R : α → α → Prop a b c : α hab : RTC R a b ⊢ RTC R a b
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.RTC.trans
[331, 1]
[340, 19]
apply tail <;> assumption
case tail α : Type R : α → α → Prop a b c✝ : α hab : RTC R a b c d : α hbc : RTC R b c hcd : R c d hac : RTC R a c ⊢ RTC R a d
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.RTC.head
[346, 1]
[355, 19]
induction hbc with | refl => exact tail _ _ refl hab | tail c d hbc hcd hac => apply tail <;> assumption
α : Type R : α → α → Prop a b c : α hab : R a b hbc : RTC R b c ⊢ RTC R a c
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.RTC.head
[346, 1]
[355, 19]
exact tail _ _ refl hab
case refl α : Type R : α → α → Prop a b c : α hab : R a b ⊢ RTC R a b
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.RTC.head
[346, 1]
[355, 19]
apply tail <;> assumption
case tail α : Type R : α → α → Prop a b c✝ : α hab : R a b c d : α hbc : RTC R b c hcd : R c d hac : RTC R a c ⊢ RTC R a d
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.RTC.head_induction_on
[357, 1]
[371, 34]
induction h with | refl => exact refl | tail b' c _ hb'c ih => apply ih (P := fun a hab' ↦ P a (RTC.tail _ _ hab' hb'c)) { exact head _ _ hb'c _ refl } { intro x y hxy hyb' hy exact head _ _ hxy _ hy }
α : Type R : α → α → Prop b : α P : (a : α) → RTC R a b → Prop a : α h : RTC R a b refl : P b (_ : RTC R b b) head : ∀ (a c : α) (h' : R a c) (h : RTC R c b), P c h → P a (_ : RTC R a b) ⊢ P a h
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.RTC.head_induction_on
[357, 1]
[371, 34]
exact refl
case refl α : Type R : α → α → Prop b a : α P : (a_1 : α) → RTC R a_1 a → Prop refl : P a (_ : RTC R a a) head : ∀ (a_1 c : α) (h' : R a_1 c) (h : RTC R c a), P c h → P a_1 (_ : RTC R a_1 a) ⊢ P a (_ : RTC R a a)
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.RTC.head_induction_on
[357, 1]
[371, 34]
apply ih (P := fun a hab' ↦ P a (RTC.tail _ _ hab' hb'c))
case tail α : Type R : α → α → Prop b a b' c : α hab : RTC R a b' hb'c : R b' c ih : ∀ {P : (a : α) → RTC R a b' → Prop}, P b' (_ : RTC R b' b') → (∀ (a c : α) (h' : R a c) (h : RTC R c b'), P c h → P a (_ : RTC R a b')) → P a hab P : (a : α) → RTC R a c → Prop refl : P c (_ : RTC R c c) head : ∀ (a c_1 : α) (h' : R a c_1) (h : RTC R c_1 c), P c_1 h → P a (_ : RTC R a c) ⊢ P a (_ : RTC R a c)
case tail.refl α : Type R : α → α → Prop b a b' c : α hab : RTC R a b' hb'c : R b' c ih : ∀ {P : (a : α) → RTC R a b' → Prop}, P b' (_ : RTC R b' b') → (∀ (a c : α) (h' : R a c) (h : RTC R c b'), P c h → P a (_ : RTC R a b')) → P a hab P : (a : α) → RTC R a c → Prop refl : P c (_ : RTC R c c) head : ∀ (a c_1 : α) (h' : R a c_1) (h : RTC R c_1 c), P c_1 h → P a (_ : RTC R a c) ⊢ P b' (_ : RTC R b' c) case tail.head α : Type R : α → α → Prop b a b' c : α hab : RTC R a b' hb'c : R b' c ih : ∀ {P : (a : α) → RTC R a b' → Prop}, P b' (_ : RTC R b' b') → (∀ (a c : α) (h' : R a c) (h : RTC R c b'), P c h → P a (_ : RTC R a b')) → P a hab P : (a : α) → RTC R a c → Prop refl : P c (_ : RTC R c c) head : ∀ (a c_1 : α) (h' : R a c_1) (h : RTC R c_1 c), P c_1 h → P a (_ : RTC R a c) ⊢ ∀ (a c_1 : α) (h' : R a c_1) (h : RTC R c_1 b'), P c_1 (_ : RTC R c_1 c) → P a (_ : RTC R a c)
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.RTC.head_induction_on
[357, 1]
[371, 34]
{ exact head _ _ hb'c _ refl }
case tail.refl α : Type R : α → α → Prop b a b' c : α hab : RTC R a b' hb'c : R b' c ih : ∀ {P : (a : α) → RTC R a b' → Prop}, P b' (_ : RTC R b' b') → (∀ (a c : α) (h' : R a c) (h : RTC R c b'), P c h → P a (_ : RTC R a b')) → P a hab P : (a : α) → RTC R a c → Prop refl : P c (_ : RTC R c c) head : ∀ (a c_1 : α) (h' : R a c_1) (h : RTC R c_1 c), P c_1 h → P a (_ : RTC R a c) ⊢ P b' (_ : RTC R b' c) case tail.head α : Type R : α → α → Prop b a b' c : α hab : RTC R a b' hb'c : R b' c ih : ∀ {P : (a : α) → RTC R a b' → Prop}, P b' (_ : RTC R b' b') → (∀ (a c : α) (h' : R a c) (h : RTC R c b'), P c h → P a (_ : RTC R a b')) → P a hab P : (a : α) → RTC R a c → Prop refl : P c (_ : RTC R c c) head : ∀ (a c_1 : α) (h' : R a c_1) (h : RTC R c_1 c), P c_1 h → P a (_ : RTC R a c) ⊢ ∀ (a c_1 : α) (h' : R a c_1) (h : RTC R c_1 b'), P c_1 (_ : RTC R c_1 c) → P a (_ : RTC R a c)
case tail.head α : Type R : α → α → Prop b a b' c : α hab : RTC R a b' hb'c : R b' c ih : ∀ {P : (a : α) → RTC R a b' → Prop}, P b' (_ : RTC R b' b') → (∀ (a c : α) (h' : R a c) (h : RTC R c b'), P c h → P a (_ : RTC R a b')) → P a hab P : (a : α) → RTC R a c → Prop refl : P c (_ : RTC R c c) head : ∀ (a c_1 : α) (h' : R a c_1) (h : RTC R c_1 c), P c_1 h → P a (_ : RTC R a c) ⊢ ∀ (a c_1 : α) (h' : R a c_1) (h : RTC R c_1 b'), P c_1 (_ : RTC R c_1 c) → P a (_ : RTC R a c)
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.RTC.head_induction_on
[357, 1]
[371, 34]
{ intro x y hxy hyb' hy exact head _ _ hxy _ hy }
case tail.head α : Type R : α → α → Prop b a b' c : α hab : RTC R a b' hb'c : R b' c ih : ∀ {P : (a : α) → RTC R a b' → Prop}, P b' (_ : RTC R b' b') → (∀ (a c : α) (h' : R a c) (h : RTC R c b'), P c h → P a (_ : RTC R a b')) → P a hab P : (a : α) → RTC R a c → Prop refl : P c (_ : RTC R c c) head : ∀ (a c_1 : α) (h' : R a c_1) (h : RTC R c_1 c), P c_1 h → P a (_ : RTC R a c) ⊢ ∀ (a c_1 : α) (h' : R a c_1) (h : RTC R c_1 b'), P c_1 (_ : RTC R c_1 c) → P a (_ : RTC R a c)
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.RTC.head_induction_on
[357, 1]
[371, 34]
exact head _ _ hb'c _ refl
case tail.refl α : Type R : α → α → Prop b a b' c : α hab : RTC R a b' hb'c : R b' c ih : ∀ {P : (a : α) → RTC R a b' → Prop}, P b' (_ : RTC R b' b') → (∀ (a c : α) (h' : R a c) (h : RTC R c b'), P c h → P a (_ : RTC R a b')) → P a hab P : (a : α) → RTC R a c → Prop refl : P c (_ : RTC R c c) head : ∀ (a c_1 : α) (h' : R a c_1) (h : RTC R c_1 c), P c_1 h → P a (_ : RTC R a c) ⊢ P b' (_ : RTC R b' c)
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.RTC.head_induction_on
[357, 1]
[371, 34]
intro x y hxy hyb' hy
case tail.head α : Type R : α → α → Prop b a b' c : α hab : RTC R a b' hb'c : R b' c ih : ∀ {P : (a : α) → RTC R a b' → Prop}, P b' (_ : RTC R b' b') → (∀ (a c : α) (h' : R a c) (h : RTC R c b'), P c h → P a (_ : RTC R a b')) → P a hab P : (a : α) → RTC R a c → Prop refl : P c (_ : RTC R c c) head : ∀ (a c_1 : α) (h' : R a c_1) (h : RTC R c_1 c), P c_1 h → P a (_ : RTC R a c) ⊢ ∀ (a c_1 : α) (h' : R a c_1) (h : RTC R c_1 b'), P c_1 (_ : RTC R c_1 c) → P a (_ : RTC R a c)
case tail.head α : Type R : α → α → Prop b a b' c : α hab : RTC R a b' hb'c : R b' c ih : ∀ {P : (a : α) → RTC R a b' → Prop}, P b' (_ : RTC R b' b') → (∀ (a c : α) (h' : R a c) (h : RTC R c b'), P c h → P a (_ : RTC R a b')) → P a hab P : (a : α) → RTC R a c → Prop refl : P c (_ : RTC R c c) head : ∀ (a c_1 : α) (h' : R a c_1) (h : RTC R c_1 c), P c_1 h → P a (_ : RTC R a c) x y : α hxy : R x y hyb' : RTC R y b' hy : P y (_ : RTC R y c) ⊢ P x (_ : RTC R x c)
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.RTC.head_induction_on
[357, 1]
[371, 34]
exact head _ _ hxy _ hy
case tail.head α : Type R : α → α → Prop b a b' c : α hab : RTC R a b' hb'c : R b' c ih : ∀ {P : (a : α) → RTC R a b' → Prop}, P b' (_ : RTC R b' b') → (∀ (a c : α) (h' : R a c) (h : RTC R c b'), P c h → P a (_ : RTC R a b')) → P a hab P : (a : α) → RTC R a c → Prop refl : P c (_ : RTC R c c) head : ∀ (a c_1 : α) (h' : R a c_1) (h : RTC R c_1 c), P c_1 h → P a (_ : RTC R a c) x y : α hxy : R x y hyb' : RTC R y b' hy : P y (_ : RTC R y c) ⊢ P x (_ : RTC R x c)
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.RTC.lift
[373, 1]
[383, 16]
induction hab with | refl => apply refl | tail b c hab hbc ih => apply tail apply ih apply hf exact hbc
α β : Type R : α → α → Prop S : β → β → Prop a b : α f : α → β hf : ∀ (a b : α), R a b → S (f a) (f b) hab : RTC R a b ⊢ RTC S (f a) (f b)
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.RTC.lift
[373, 1]
[383, 16]
apply refl
case refl α β : Type R : α → α → Prop S : β → β → Prop a b : α f : α → β hf : ∀ (a b : α), R a b → S (f a) (f b) ⊢ RTC S (f a) (f a)
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.RTC.lift
[373, 1]
[383, 16]
apply tail
case tail α β : Type R : α → α → Prop S : β → β → Prop a b✝ : α f : α → β hf : ∀ (a b : α), R a b → S (f a) (f b) b c : α hab : RTC R a b hbc : R b c ih : RTC S (f a) (f b) ⊢ RTC S (f a) (f c)
case tail.hab α β : Type R : α → α → Prop S : β → β → Prop a b✝ : α f : α → β hf : ∀ (a b : α), R a b → S (f a) (f b) b c : α hab : RTC R a b hbc : R b c ih : RTC S (f a) (f b) ⊢ RTC S (f a) ?tail.b case tail.hbc α β : Type R : α → α → Prop S : β → β → Prop a b✝ : α f : α → β hf : ∀ (a b : α), R a b → S (f a) (f b) b c : α hab : RTC R a b hbc : R b c ih : RTC S (f a) (f b) ⊢ S ?tail.b (f c) case tail.b α β : Type R : α → α → Prop S : β → β → Prop a b✝ : α f : α → β hf : ∀ (a b : α), R a b → S (f a) (f b) b c : α hab : RTC R a b hbc : R b c ih : RTC S (f a) (f b) ⊢ β
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.RTC.lift
[373, 1]
[383, 16]
apply ih
case tail.hab α β : Type R : α → α → Prop S : β → β → Prop a b✝ : α f : α → β hf : ∀ (a b : α), R a b → S (f a) (f b) b c : α hab : RTC R a b hbc : R b c ih : RTC S (f a) (f b) ⊢ RTC S (f a) ?tail.b case tail.hbc α β : Type R : α → α → Prop S : β → β → Prop a b✝ : α f : α → β hf : ∀ (a b : α), R a b → S (f a) (f b) b c : α hab : RTC R a b hbc : R b c ih : RTC S (f a) (f b) ⊢ S ?tail.b (f c) case tail.b α β : Type R : α → α → Prop S : β → β → Prop a b✝ : α f : α → β hf : ∀ (a b : α), R a b → S (f a) (f b) b c : α hab : RTC R a b hbc : R b c ih : RTC S (f a) (f b) ⊢ β
case tail.hbc α β : Type R : α → α → Prop S : β → β → Prop a b✝ : α f : α → β hf : ∀ (a b : α), R a b → S (f a) (f b) b c : α hab : RTC R a b hbc : R b c ih : RTC S (f a) (f b) ⊢ S (f b) (f c)
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.RTC.lift
[373, 1]
[383, 16]
apply hf
case tail.hbc α β : Type R : α → α → Prop S : β → β → Prop a b✝ : α f : α → β hf : ∀ (a b : α), R a b → S (f a) (f b) b c : α hab : RTC R a b hbc : R b c ih : RTC S (f a) (f b) ⊢ S (f b) (f c)
case tail.hbc.a α β : Type R : α → α → Prop S : β → β → Prop a b✝ : α f : α → β hf : ∀ (a b : α), R a b → S (f a) (f b) b c : α hab : RTC R a b hbc : R b c ih : RTC S (f a) (f b) ⊢ R b c
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.RTC.lift
[373, 1]
[383, 16]
exact hbc
case tail.hbc.a α β : Type R : α → α → Prop S : β → β → Prop a b✝ : α f : α → β hf : ∀ (a b : α), R a b → S (f a) (f b) b c : α hab : RTC R a b hbc : R b c ih : RTC S (f a) (f b) ⊢ R b c
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.RTC.RTC_RTC_eq
[389, 1]
[405, 26]
induction h with | refl => exact refl | tail b c hab' hbc ih => apply trans <;> assumption
α : Type R : α → α → Prop a b : α h : RTC (RTC R) a b ⊢ RTC R a b
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.RTC.RTC_RTC_eq
[389, 1]
[405, 26]
exact refl
case refl α : Type R : α → α → Prop a b : α ⊢ RTC R a a
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.RTC.RTC_RTC_eq
[389, 1]
[405, 26]
apply trans <;> assumption
case tail α : Type R : α → α → Prop a b✝ b c : α hab' : RTC (RTC R) a b hbc : RTC R b c ih : RTC R a b ⊢ RTC R a c
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.update_apply
[438, 9]
[442, 8]
apply if_pos
name : String val : ℕ s : State ⊢ State.update name val s name = val
case hc name : String val : ℕ s : State ⊢ name = name
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.update_apply
[438, 9]
[442, 8]
rfl
case hc name : String val : ℕ s : State ⊢ name = name
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.update_apply_neq
[444, 9]
[449, 15]
apply if_neg
name name' : String val : ℕ s : State hneq : name' ≠ name ⊢ State.update name val s name' = s name'
case hnc name name' : String val : ℕ s : State hneq : name' ≠ name ⊢ ¬name' = name
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.update_apply_neq
[444, 9]
[449, 15]
assumption
case hnc name name' : String val : ℕ s : State hneq : name' ≠ name ⊢ ¬name' = name
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.update_override
[451, 9]
[458, 24]
apply funext
name : String val₁ val₂ : ℕ s : State ⊢ State.update name val₁ (State.update name val₂ s) = State.update name val₁ s
case h name : String val₁ val₂ : ℕ s : State ⊢ ∀ (x : String), State.update name val₁ (State.update name val₂ s) x = State.update name val₁ s x
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.update_override
[451, 9]
[458, 24]
intro name'
case h name : String val₁ val₂ : ℕ s : State ⊢ ∀ (x : String), State.update name val₁ (State.update name val₂ s) x = State.update name val₁ s x
case h name : String val₁ val₂ : ℕ s : State name' : String ⊢ State.update name val₁ (State.update name val₂ s) name' = State.update name val₁ s name'
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.update_override
[451, 9]
[458, 24]
cases Classical.em (name' = name) with | inl h => simp [h] | inr h => simp [h]
case h name : String val₁ val₂ : ℕ s : State name' : String ⊢ State.update name val₁ (State.update name val₂ s) name' = State.update name val₁ s name'
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.update_override
[451, 9]
[458, 24]
simp [h]
case h.inl name : String val₁ val₂ : ℕ s : State name' : String h : name' = name ⊢ State.update name val₁ (State.update name val₂ s) name' = State.update name val₁ s name'
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.update_override
[451, 9]
[458, 24]
simp [h]
case h.inr name : String val₁ val₂ : ℕ s : State name' : String h : ¬name' = name ⊢ State.update name val₁ (State.update name val₂ s) name' = State.update name val₁ s name'
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.update_swap
[460, 9]
[471, 40]
apply funext
name₁ name₂ : String val₁ val₂ : ℕ s : State hneq : name₁ ≠ name₂ ⊢ State.update name₁ val₁ (State.update name₂ val₂ s) = State.update name₂ val₂ (State.update name₁ val₁ s)
case h name₁ name₂ : String val₁ val₂ : ℕ s : State hneq : name₁ ≠ name₂ ⊢ ∀ (x : String), State.update name₁ val₁ (State.update name₂ val₂ s) x = State.update name₂ val₂ (State.update name₁ val₁ s) x
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.update_swap
[460, 9]
[471, 40]
intro name'
case h name₁ name₂ : String val₁ val₂ : ℕ s : State hneq : name₁ ≠ name₂ ⊢ ∀ (x : String), State.update name₁ val₁ (State.update name₂ val₂ s) x = State.update name₂ val₂ (State.update name₁ val₁ s) x
case h name₁ name₂ : String val₁ val₂ : ℕ s : State hneq : name₁ ≠ name₂ name' : String ⊢ State.update name₁ val₁ (State.update name₂ val₂ s) name' = State.update name₂ val₂ (State.update name₁ val₁ s) name'
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.update_swap
[460, 9]
[471, 40]
cases Classical.em (name' = name₁) with | inl h => simp [*] | inr h => cases Classical.em (name' = name₁) with | inl h => simp [*] | inr h => simp [State.update, *]
case h name₁ name₂ : String val₁ val₂ : ℕ s : State hneq : name₁ ≠ name₂ name' : String ⊢ State.update name₁ val₁ (State.update name₂ val₂ s) name' = State.update name₂ val₂ (State.update name₁ val₁ s) name'
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.update_swap
[460, 9]
[471, 40]
simp [*]
case h.inl name₁ name₂ : String val₁ val₂ : ℕ s : State hneq : name₁ ≠ name₂ name' : String h : name' = name₁ ⊢ State.update name₁ val₁ (State.update name₂ val₂ s) name' = State.update name₂ val₂ (State.update name₁ val₁ s) name'
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.update_swap
[460, 9]
[471, 40]
cases Classical.em (name' = name₁) with | inl h => simp [*] | inr h => simp [State.update, *]
case h.inr name₁ name₂ : String val₁ val₂ : ℕ s : State hneq : name₁ ≠ name₂ name' : String h : ¬name' = name₁ ⊢ State.update name₁ val₁ (State.update name₂ val₂ s) name' = State.update name₂ val₂ (State.update name₁ val₁ s) name'
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.update_swap
[460, 9]
[471, 40]
simp [*]
case h.inr.inl name₁ name₂ : String val₁ val₂ : ℕ s : State hneq : name₁ ≠ name₂ name' : String h✝ : ¬name' = name₁ h : name' = name₁ ⊢ State.update name₁ val₁ (State.update name₂ val₂ s) name' = State.update name₂ val₂ (State.update name₁ val₁ s) name'
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.update_swap
[460, 9]
[471, 40]
simp [State.update, *]
case h.inr.inr name₁ name₂ : String val₁ val₂ : ℕ s : State hneq : name₁ ≠ name₂ name' : String h✝ h : ¬name' = name₁ ⊢ State.update name₁ val₁ (State.update name₂ val₂ s) name' = State.update name₂ val₂ (State.update name₁ val₁ s) name'
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.update_id
[473, 9]
[480, 13]
apply funext
name : String s : State ⊢ State.update name (s name) s = s
case h name : String s : State ⊢ ∀ (x : String), State.update name (s name) s x = s x
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.update_id
[473, 9]
[480, 13]
intro name'
case h name : String s : State ⊢ ∀ (x : String), State.update name (s name) s x = s x
case h name : String s : State name' : String ⊢ State.update name (s name) s name' = s name'
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.update_id
[473, 9]
[480, 13]
simp [State.update]
case h name : String s : State name' : String ⊢ State.update name (s name) s name' = s name'
case h name : String s : State name' : String ⊢ name' = name → s name = s name'
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.update_id
[473, 9]
[480, 13]
intro heq
case h name : String s : State name' : String ⊢ name' = name → s name = s name'
case h name : String s : State name' : String heq : name' = name ⊢ s name = s name'
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.update_id
[473, 9]
[480, 13]
simp [*]
case h name : String s : State name' : String heq : name' = name ⊢ s name = s name'
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.update_same_const
[482, 9]
[486, 24]
apply funext
name : String val : ℕ ⊢ (State.update name val fun x => val) = fun x => val
case h name : String val : ℕ ⊢ ∀ (x : String), State.update name val (fun x => val) x = val
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/LoVelib.lean
LoVe.update_same_const
[482, 9]
[486, 24]
simp [State.update]
case h name : String val : ℕ ⊢ ∀ (x : String), State.update name val (fun x => val) x = val
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/Lectures/LoVe07_EffectfulProgramming_Demo.lean
LoVe.mmap_append
[449, 1]
[460, 30]
simp [mmap, LawfulMonad.bind_pure, LawfulMonad.pure_bind]
m : Type → Type inst✝ : LawfulMonad m α β : Type f : α → m β x✝ : List α ⊢ mmap f ([] ++ x✝) = do let bs ← mmap f [] let bs' ← mmap f x✝ pure (bs ++ bs')
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/Lectures/LoVe07_EffectfulProgramming_Demo.lean
LoVe.mmap_append
[449, 1]
[460, 30]
simp [mmap, mmap_append _ as as', LawfulMonad.pure_bind, LawfulMonad.bind_assoc]
m : Type → Type inst✝ : LawfulMonad m α β : Type f : α → m β a : α as as' : List α ⊢ mmap f (a :: as ++ as') = do let bs ← mmap f (a :: as) let bs' ← mmap f as' pure (bs ++ bs')
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/Labs/Lab8Solution.lean
LoVe.List.length_add
[31, 1]
[48, 18]
simp [List.add]
⊢ List.length [] = List.length [] → List.length (add [] []) = List.length []
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/Labs/Lab8Solution.lean
LoVe.List.length_add
[31, 1]
[48, 18]
simp [List.add, List.length]
x : ℤ xs : List ℤ y : ℤ ys : List ℤ ⊢ List.length (x :: xs) = List.length (y :: ys) → List.length (add (x :: xs) (y :: ys)) = List.length (x :: xs)
x : ℤ xs : List ℤ y : ℤ ys : List ℤ ⊢ List.length xs = List.length ys → List.length (add xs ys) = List.length xs
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/Labs/Lab8Solution.lean
LoVe.List.length_add
[31, 1]
[48, 18]
intro hsame
x : ℤ xs : List ℤ y : ℤ ys : List ℤ ⊢ List.length xs = List.length ys → List.length (add xs ys) = List.length xs
x : ℤ xs : List ℤ y : ℤ ys : List ℤ hsame : List.length xs = List.length ys ⊢ List.length (add xs ys) = List.length xs
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/Labs/Lab8Solution.lean
LoVe.List.length_add
[31, 1]
[48, 18]
rw [List.length_add xs ys hsame]
x : ℤ xs : List ℤ y : ℤ ys : List ℤ hsame : List.length xs = List.length ys ⊢ List.length (add xs ys) = List.length xs
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/Labs/Lab8Solution.lean
LoVe.List.length_add
[31, 1]
[48, 18]
intro hsame
y : ℤ ys : List ℤ ⊢ List.length [] = List.length (y :: ys) → List.length (add [] (y :: ys)) = List.length []
y : ℤ ys : List ℤ hsame : List.length [] = List.length (y :: ys) ⊢ List.length (add [] (y :: ys)) = List.length []
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/Labs/Lab8Solution.lean
LoVe.List.length_add
[31, 1]
[48, 18]
cases hsame
y : ℤ ys : List ℤ hsame : List.length [] = List.length (y :: ys) ⊢ List.length (add [] (y :: ys)) = List.length []
no goals
https://github.com/BrownCS1951x/fpv2023.git
9aaf6b5c454aa9a70fc4e6807adf3123b001ea66
LoVe/Labs/Lab8Solution.lean
LoVe.List.length_add
[31, 1]
[48, 18]
intro hsame
x : ℤ xs : List ℤ ⊢ List.length (x :: xs) = List.length [] → List.length (add (x :: xs) []) = List.length (x :: xs)
x : ℤ xs : List ℤ hsame : List.length (x :: xs) = List.length [] ⊢ List.length (add (x :: xs) []) = List.length (x :: xs)