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
input
stringlengths
73
2.09M
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/Lectures/Lecture7.lean
coe_fib_eq
[202, 1]
[210, 9]
ring
n k : ℕ ih1 : ↑(fib k) = (ϕ ^ k - ψ ^ k) / (ϕ - ψ) ih2 : ↑(fib (k + 1)) = (ϕ ^ (k + 1) - ψ ^ (k + 1)) / (ϕ - ψ) ⊢ ϕ ^ k * ϕ - ψ ^ k * ψ + (ϕ ^ k - ψ ^ k) = ϕ ^ k * (ϕ + 1) - ψ ^ k * (ψ + 1)
no goals
Please generate a tactic in lean4 to solve the state. STATE: n k : ℕ ih1 : ↑(fib k) = (ϕ ^ k - ψ ^ k) / (ϕ - ψ) ih2 : ↑(fib (k + 1)) = (ϕ ^ (k + 1) - ψ ^ (k + 1)) / (ϕ - ψ) ⊢ ϕ ^ k * ϕ - ψ ^ k * ψ + (ϕ ^ k - ψ ^ k) = ϕ ^ k * (ϕ + 1) - ψ ^ k * (ψ + 1) TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/Lectures/Lecture7.lean
fac_dvd_fac
[245, 1]
[245, 70]
sorry
n✝ n m : ℕ h : n ≤ m ⊢ fac n ∣ fac m
no goals
Please generate a tactic in lean4 to solve the state. STATE: n✝ n m : ℕ h : n ≤ m ⊢ fac n ∣ fac m TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/Lectures/Lecture7.lean
le_generateFrom_iff_subset_isOpen
[258, 1]
[276, 13]
intro s hs
n : ℕ α : Type u_1 t : TopologicalSpace α g : Set (Set α) h : g ⊆ {s | IsOpen s} ⊢ {s | IsOpen s} ⊆ {s | IsOpen s}
n : ℕ α : Type u_1 t : TopologicalSpace α g : Set (Set α) h : g ⊆ {s | IsOpen s} s : Set α hs : s ∈ {s | IsOpen s} ⊢ s ∈ {s | IsOpen s}
Please generate a tactic in lean4 to solve the state. STATE: n : ℕ α : Type u_1 t : TopologicalSpace α g : Set (Set α) h : g ⊆ {s | IsOpen s} ⊢ {s | IsOpen s} ⊆ {s | IsOpen s} TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/Lectures/Lecture7.lean
le_generateFrom_iff_subset_isOpen
[258, 1]
[276, 13]
simp
n : ℕ α : Type u_1 t : TopologicalSpace α g : Set (Set α) h : g ⊆ {s | IsOpen s} s : Set α hs : s ∈ {s | IsOpen s} ⊢ s ∈ {s | IsOpen s}
n : ℕ α : Type u_1 t : TopologicalSpace α g : Set (Set α) h : g ⊆ {s | IsOpen s} s : Set α hs : s ∈ {s | IsOpen s} ⊢ IsOpen s
Please generate a tactic in lean4 to solve the state. STATE: n : ℕ α : Type u_1 t : TopologicalSpace α g : Set (Set α) h : g ⊆ {s | IsOpen s} s : Set α hs : s ∈ {s | IsOpen s} ⊢ s ∈ {s | IsOpen s} TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/Lectures/Lecture7.lean
le_generateFrom_iff_subset_isOpen
[258, 1]
[276, 13]
simp at hs
n : ℕ α : Type u_1 t : TopologicalSpace α g : Set (Set α) h : g ⊆ {s | IsOpen s} s : Set α hs : s ∈ {s | IsOpen s} ⊢ IsOpen s
n : ℕ α : Type u_1 t : TopologicalSpace α g : Set (Set α) h : g ⊆ {s | IsOpen s} s : Set α hs : IsOpen s ⊢ IsOpen s
Please generate a tactic in lean4 to solve the state. STATE: n : ℕ α : Type u_1 t : TopologicalSpace α g : Set (Set α) h : g ⊆ {s | IsOpen s} s : Set α hs : s ∈ {s | IsOpen s} ⊢ IsOpen s TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/Lectures/Lecture7.lean
le_generateFrom_iff_subset_isOpen
[258, 1]
[276, 13]
induction hs
n : ℕ α : Type u_1 t : TopologicalSpace α g : Set (Set α) h : g ⊆ {s | IsOpen s} s : Set α hs : IsOpen s ⊢ IsOpen s
case basic n : ℕ α : Type u_1 t : TopologicalSpace α g : Set (Set α) h : g ⊆ {s | IsOpen s} s s✝ : Set α a✝ : s✝ ∈ g ⊢ IsOpen s✝ case univ n : ℕ α : Type u_1 t : TopologicalSpace α g : Set (Set α) h : g ⊆ {s | IsOpen s} s : Set α ⊢ IsOpen Set.univ case inter n : ℕ α : Type u_1 t : TopologicalSpace α g : Set (Set α) h : g ⊆ {s | IsOpen s} s s✝ t✝ : Set α a✝¹ : GenerateOpen g s✝ a✝ : GenerateOpen g t✝ a_ih✝¹ : IsOpen s✝ a_ih✝ : IsOpen t✝ ⊢ IsOpen (s✝ ∩ t✝) case sUnion n : ℕ α : Type u_1 t : TopologicalSpace α g : Set (Set α) h : g ⊆ {s | IsOpen s} s : Set α S✝ : Set (Set α) a✝ : ∀ s ∈ S✝, GenerateOpen g s a_ih✝ : ∀ s ∈ S✝, IsOpen s ⊢ IsOpen (⋃₀ S✝)
Please generate a tactic in lean4 to solve the state. STATE: n : ℕ α : Type u_1 t : TopologicalSpace α g : Set (Set α) h : g ⊆ {s | IsOpen s} s : Set α hs : IsOpen s ⊢ IsOpen s TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/Lectures/Lecture7.lean
le_generateFrom_iff_subset_isOpen
[258, 1]
[276, 13]
case basic s hs => apply h exact hs
n : ℕ α : Type u_1 t : TopologicalSpace α g : Set (Set α) h : g ⊆ {s | IsOpen s} s✝ s : Set α hs : s ∈ g ⊢ IsOpen s
no goals
Please generate a tactic in lean4 to solve the state. STATE: n : ℕ α : Type u_1 t : TopologicalSpace α g : Set (Set α) h : g ⊆ {s | IsOpen s} s✝ s : Set α hs : s ∈ g ⊢ IsOpen s TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/Lectures/Lecture7.lean
le_generateFrom_iff_subset_isOpen
[258, 1]
[276, 13]
case univ => simp
n : ℕ α : Type u_1 t : TopologicalSpace α g : Set (Set α) h : g ⊆ {s | IsOpen s} s : Set α ⊢ IsOpen Set.univ
no goals
Please generate a tactic in lean4 to solve the state. STATE: n : ℕ α : Type u_1 t : TopologicalSpace α g : Set (Set α) h : g ⊆ {s | IsOpen s} s : Set α ⊢ IsOpen Set.univ TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/Lectures/Lecture7.lean
le_generateFrom_iff_subset_isOpen
[258, 1]
[276, 13]
case inter s s' _ _ ihs ihs' => apply IsOpen.inter exact ihs exact ihs'
n : ℕ α : Type u_1 t : TopologicalSpace α g : Set (Set α) h : g ⊆ {s | IsOpen s} s✝ s s' : Set α a✝¹ : GenerateOpen g s a✝ : GenerateOpen g s' ihs : IsOpen s ihs' : IsOpen s' ⊢ IsOpen (s ∩ s')
no goals
Please generate a tactic in lean4 to solve the state. STATE: n : ℕ α : Type u_1 t : TopologicalSpace α g : Set (Set α) h : g ⊆ {s | IsOpen s} s✝ s s' : Set α a✝¹ : GenerateOpen g s a✝ : GenerateOpen g s' ihs : IsOpen s ihs' : IsOpen s' ⊢ IsOpen (s ∩ s') TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/Lectures/Lecture7.lean
le_generateFrom_iff_subset_isOpen
[258, 1]
[276, 13]
case sUnion S _ hS => apply isOpen_sUnion exact hS
n : ℕ α : Type u_1 t : TopologicalSpace α g : Set (Set α) h : g ⊆ {s | IsOpen s} s : Set α S : Set (Set α) a✝ : ∀ s ∈ S, GenerateOpen g s hS : ∀ s ∈ S, IsOpen s ⊢ IsOpen (⋃₀ S)
no goals
Please generate a tactic in lean4 to solve the state. STATE: n : ℕ α : Type u_1 t : TopologicalSpace α g : Set (Set α) h : g ⊆ {s | IsOpen s} s : Set α S : Set (Set α) a✝ : ∀ s ∈ S, GenerateOpen g s hS : ∀ s ∈ S, IsOpen s ⊢ IsOpen (⋃₀ S) TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/Lectures/Lecture7.lean
le_generateFrom_iff_subset_isOpen
[258, 1]
[276, 13]
apply h
n : ℕ α : Type u_1 t : TopologicalSpace α g : Set (Set α) h : g ⊆ {s | IsOpen s} s✝ s : Set α hs : s ∈ g ⊢ IsOpen s
case a n : ℕ α : Type u_1 t : TopologicalSpace α g : Set (Set α) h : g ⊆ {s | IsOpen s} s✝ s : Set α hs : s ∈ g ⊢ s ∈ g
Please generate a tactic in lean4 to solve the state. STATE: n : ℕ α : Type u_1 t : TopologicalSpace α g : Set (Set α) h : g ⊆ {s | IsOpen s} s✝ s : Set α hs : s ∈ g ⊢ IsOpen s TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/Lectures/Lecture7.lean
le_generateFrom_iff_subset_isOpen
[258, 1]
[276, 13]
exact hs
case a n : ℕ α : Type u_1 t : TopologicalSpace α g : Set (Set α) h : g ⊆ {s | IsOpen s} s✝ s : Set α hs : s ∈ g ⊢ s ∈ g
no goals
Please generate a tactic in lean4 to solve the state. STATE: case a n : ℕ α : Type u_1 t : TopologicalSpace α g : Set (Set α) h : g ⊆ {s | IsOpen s} s✝ s : Set α hs : s ∈ g ⊢ s ∈ g TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/Lectures/Lecture7.lean
le_generateFrom_iff_subset_isOpen
[258, 1]
[276, 13]
simp
n : ℕ α : Type u_1 t : TopologicalSpace α g : Set (Set α) h : g ⊆ {s | IsOpen s} s : Set α ⊢ IsOpen Set.univ
no goals
Please generate a tactic in lean4 to solve the state. STATE: n : ℕ α : Type u_1 t : TopologicalSpace α g : Set (Set α) h : g ⊆ {s | IsOpen s} s : Set α ⊢ IsOpen Set.univ TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/Lectures/Lecture7.lean
le_generateFrom_iff_subset_isOpen
[258, 1]
[276, 13]
apply IsOpen.inter
n : ℕ α : Type u_1 t : TopologicalSpace α g : Set (Set α) h : g ⊆ {s | IsOpen s} s✝ s s' : Set α a✝¹ : GenerateOpen g s a✝ : GenerateOpen g s' ihs : IsOpen s ihs' : IsOpen s' ⊢ IsOpen (s ∩ s')
case h₁ n : ℕ α : Type u_1 t : TopologicalSpace α g : Set (Set α) h : g ⊆ {s | IsOpen s} s✝ s s' : Set α a✝¹ : GenerateOpen g s a✝ : GenerateOpen g s' ihs : IsOpen s ihs' : IsOpen s' ⊢ IsOpen s case h₂ n : ℕ α : Type u_1 t : TopologicalSpace α g : Set (Set α) h : g ⊆ {s | IsOpen s} s✝ s s' : Set α a✝¹ : GenerateOpen g s a✝ : GenerateOpen g s' ihs : IsOpen s ihs' : IsOpen s' ⊢ IsOpen s'
Please generate a tactic in lean4 to solve the state. STATE: n : ℕ α : Type u_1 t : TopologicalSpace α g : Set (Set α) h : g ⊆ {s | IsOpen s} s✝ s s' : Set α a✝¹ : GenerateOpen g s a✝ : GenerateOpen g s' ihs : IsOpen s ihs' : IsOpen s' ⊢ IsOpen (s ∩ s') TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/Lectures/Lecture7.lean
le_generateFrom_iff_subset_isOpen
[258, 1]
[276, 13]
exact ihs
case h₁ n : ℕ α : Type u_1 t : TopologicalSpace α g : Set (Set α) h : g ⊆ {s | IsOpen s} s✝ s s' : Set α a✝¹ : GenerateOpen g s a✝ : GenerateOpen g s' ihs : IsOpen s ihs' : IsOpen s' ⊢ IsOpen s case h₂ n : ℕ α : Type u_1 t : TopologicalSpace α g : Set (Set α) h : g ⊆ {s | IsOpen s} s✝ s s' : Set α a✝¹ : GenerateOpen g s a✝ : GenerateOpen g s' ihs : IsOpen s ihs' : IsOpen s' ⊢ IsOpen s'
case h₂ n : ℕ α : Type u_1 t : TopologicalSpace α g : Set (Set α) h : g ⊆ {s | IsOpen s} s✝ s s' : Set α a✝¹ : GenerateOpen g s a✝ : GenerateOpen g s' ihs : IsOpen s ihs' : IsOpen s' ⊢ IsOpen s'
Please generate a tactic in lean4 to solve the state. STATE: case h₁ n : ℕ α : Type u_1 t : TopologicalSpace α g : Set (Set α) h : g ⊆ {s | IsOpen s} s✝ s s' : Set α a✝¹ : GenerateOpen g s a✝ : GenerateOpen g s' ihs : IsOpen s ihs' : IsOpen s' ⊢ IsOpen s case h₂ n : ℕ α : Type u_1 t : TopologicalSpace α g : Set (Set α) h : g ⊆ {s | IsOpen s} s✝ s s' : Set α a✝¹ : GenerateOpen g s a✝ : GenerateOpen g s' ihs : IsOpen s ihs' : IsOpen s' ⊢ IsOpen s' TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/Lectures/Lecture7.lean
le_generateFrom_iff_subset_isOpen
[258, 1]
[276, 13]
exact ihs'
case h₂ n : ℕ α : Type u_1 t : TopologicalSpace α g : Set (Set α) h : g ⊆ {s | IsOpen s} s✝ s s' : Set α a✝¹ : GenerateOpen g s a✝ : GenerateOpen g s' ihs : IsOpen s ihs' : IsOpen s' ⊢ IsOpen s'
no goals
Please generate a tactic in lean4 to solve the state. STATE: case h₂ n : ℕ α : Type u_1 t : TopologicalSpace α g : Set (Set α) h : g ⊆ {s | IsOpen s} s✝ s s' : Set α a✝¹ : GenerateOpen g s a✝ : GenerateOpen g s' ihs : IsOpen s ihs' : IsOpen s' ⊢ IsOpen s' TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/Lectures/Lecture7.lean
le_generateFrom_iff_subset_isOpen
[258, 1]
[276, 13]
apply isOpen_sUnion
n : ℕ α : Type u_1 t : TopologicalSpace α g : Set (Set α) h : g ⊆ {s | IsOpen s} s : Set α S : Set (Set α) a✝ : ∀ s ∈ S, GenerateOpen g s hS : ∀ s ∈ S, IsOpen s ⊢ IsOpen (⋃₀ S)
case h n : ℕ α : Type u_1 t : TopologicalSpace α g : Set (Set α) h : g ⊆ {s | IsOpen s} s : Set α S : Set (Set α) a✝ : ∀ s ∈ S, GenerateOpen g s hS : ∀ s ∈ S, IsOpen s ⊢ ∀ t_1 ∈ S, IsOpen t_1
Please generate a tactic in lean4 to solve the state. STATE: n : ℕ α : Type u_1 t : TopologicalSpace α g : Set (Set α) h : g ⊆ {s | IsOpen s} s : Set α S : Set (Set α) a✝ : ∀ s ∈ S, GenerateOpen g s hS : ∀ s ∈ S, IsOpen s ⊢ IsOpen (⋃₀ S) TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/Lectures/Lecture7.lean
le_generateFrom_iff_subset_isOpen
[258, 1]
[276, 13]
exact hS
case h n : ℕ α : Type u_1 t : TopologicalSpace α g : Set (Set α) h : g ⊆ {s | IsOpen s} s : Set α S : Set (Set α) a✝ : ∀ s ∈ S, GenerateOpen g s hS : ∀ s ∈ S, IsOpen s ⊢ ∀ t_1 ∈ S, IsOpen t_1
no goals
Please generate a tactic in lean4 to solve the state. STATE: case h n : ℕ α : Type u_1 t : TopologicalSpace α g : Set (Set α) h : g ⊆ {s | IsOpen s} s : Set α S : Set (Set α) a✝ : ∀ s ∈ S, GenerateOpen g s hS : ∀ s ∈ S, IsOpen s ⊢ ∀ t_1 ∈ S, IsOpen t_1 TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/solutions/Solutions_S02_Induction_and_Recursion.lean
pow_two_le_fac
[9, 1]
[18, 16]
rcases n with _ | n
n : ℕ ⊢ 2 ^ (n - 1) ≤ fac n
case zero ⊢ 2 ^ (Nat.zero - 1) ≤ fac Nat.zero case succ n : ℕ ⊢ 2 ^ (Nat.succ n - 1) ≤ fac (Nat.succ n)
Please generate a tactic in lean4 to solve the state. STATE: n : ℕ ⊢ 2 ^ (n - 1) ≤ fac n TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/solutions/Solutions_S02_Induction_and_Recursion.lean
pow_two_le_fac
[9, 1]
[18, 16]
induction' n with n ih
case succ n : ℕ ⊢ 2 ^ (Nat.succ n - 1) ≤ fac (Nat.succ n)
case succ.zero ⊢ 2 ^ (Nat.succ 0 - 1) ≤ fac (Nat.succ 0) case succ.succ n : ℕ ih : 2 ^ (Nat.succ n - 1) ≤ fac (Nat.succ n) ⊢ 2 ^ (Nat.succ (n + 1) - 1) ≤ fac (Nat.succ (n + 1))
Please generate a tactic in lean4 to solve the state. STATE: case succ n : ℕ ⊢ 2 ^ (Nat.succ n - 1) ≤ fac (Nat.succ n) TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/solutions/Solutions_S02_Induction_and_Recursion.lean
pow_two_le_fac
[9, 1]
[18, 16]
simp at *
case succ.succ n : ℕ ih : 2 ^ (Nat.succ n - 1) ≤ fac (Nat.succ n) ⊢ 2 ^ (Nat.succ (n + 1) - 1) ≤ fac (Nat.succ (n + 1))
case succ.succ n : ℕ ih : 2 ^ n ≤ fac (Nat.succ n) ⊢ 2 ^ (n + 1) ≤ fac (Nat.succ (n + 1))
Please generate a tactic in lean4 to solve the state. STATE: case succ.succ n : ℕ ih : 2 ^ (Nat.succ n - 1) ≤ fac (Nat.succ n) ⊢ 2 ^ (Nat.succ (n + 1) - 1) ≤ fac (Nat.succ (n + 1)) TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/solutions/Solutions_S02_Induction_and_Recursion.lean
pow_two_le_fac
[9, 1]
[18, 16]
rw [pow_succ, fac]
case succ.succ n : ℕ ih : 2 ^ n ≤ fac (Nat.succ n) ⊢ 2 ^ (n + 1) ≤ fac (Nat.succ (n + 1))
case succ.succ n : ℕ ih : 2 ^ n ≤ fac (Nat.succ n) ⊢ 2 * 2 ^ n ≤ (n + 1 + 1) * fac (n + 1)
Please generate a tactic in lean4 to solve the state. STATE: case succ.succ n : ℕ ih : 2 ^ n ≤ fac (Nat.succ n) ⊢ 2 ^ (n + 1) ≤ fac (Nat.succ (n + 1)) TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/solutions/Solutions_S02_Induction_and_Recursion.lean
pow_two_le_fac
[9, 1]
[18, 16]
apply Nat.mul_le_mul _ ih
case succ.succ n : ℕ ih : 2 ^ n ≤ fac (Nat.succ n) ⊢ 2 * 2 ^ n ≤ (n + 1 + 1) * fac (n + 1)
n : ℕ ih : 2 ^ n ≤ fac (Nat.succ n) ⊢ 2 ≤ n + 1 + 1
Please generate a tactic in lean4 to solve the state. STATE: case succ.succ n : ℕ ih : 2 ^ n ≤ fac (Nat.succ n) ⊢ 2 * 2 ^ n ≤ (n + 1 + 1) * fac (n + 1) TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/solutions/Solutions_S02_Induction_and_Recursion.lean
pow_two_le_fac
[9, 1]
[18, 16]
repeat' apply Nat.succ_le_succ
n : ℕ ih : 2 ^ n ≤ fac (Nat.succ n) ⊢ 2 ≤ n + 1 + 1
case a.a n : ℕ ih : 2 ^ n ≤ fac (Nat.succ n) ⊢ 0 ≤ n
Please generate a tactic in lean4 to solve the state. STATE: n : ℕ ih : 2 ^ n ≤ fac (Nat.succ n) ⊢ 2 ≤ n + 1 + 1 TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/solutions/Solutions_S02_Induction_and_Recursion.lean
pow_two_le_fac
[9, 1]
[18, 16]
apply zero_le
case a.a n : ℕ ih : 2 ^ n ≤ fac (Nat.succ n) ⊢ 0 ≤ n
no goals
Please generate a tactic in lean4 to solve the state. STATE: case a.a n : ℕ ih : 2 ^ n ≤ fac (Nat.succ n) ⊢ 0 ≤ n TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/solutions/Solutions_S02_Induction_and_Recursion.lean
pow_two_le_fac
[9, 1]
[18, 16]
simp [fac]
case zero ⊢ 2 ^ (Nat.zero - 1) ≤ fac Nat.zero
no goals
Please generate a tactic in lean4 to solve the state. STATE: case zero ⊢ 2 ^ (Nat.zero - 1) ≤ fac Nat.zero TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/solutions/Solutions_S02_Induction_and_Recursion.lean
pow_two_le_fac
[9, 1]
[18, 16]
simp [fac]
case succ.zero ⊢ 2 ^ (Nat.succ 0 - 1) ≤ fac (Nat.succ 0)
no goals
Please generate a tactic in lean4 to solve the state. STATE: case succ.zero ⊢ 2 ^ (Nat.succ 0 - 1) ≤ fac (Nat.succ 0) TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/solutions/Solutions_S02_Induction_and_Recursion.lean
pow_two_le_fac
[9, 1]
[18, 16]
apply Nat.succ_le_succ
case a n : ℕ ih : 2 ^ n ≤ fac (Nat.succ n) ⊢ 1 ≤ n + 1
case a.a n : ℕ ih : 2 ^ n ≤ fac (Nat.succ n) ⊢ 0 ≤ n
Please generate a tactic in lean4 to solve the state. STATE: case a n : ℕ ih : 2 ^ n ≤ fac (Nat.succ n) ⊢ 1 ≤ n + 1 TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/solutions/Solutions_S02_Induction_and_Recursion.lean
sum_sqr
[27, 1]
[33, 7]
symm
α : Type u_1 s : Finset ℕ f : ℕ → ℕ n✝ n : ℕ ⊢ ∑ i in range (n + 1), i ^ 2 = n * (n + 1) * (2 * n + 1) / 6
α : Type u_1 s : Finset ℕ f : ℕ → ℕ n✝ n : ℕ ⊢ n * (n + 1) * (2 * n + 1) / 6 = ∑ i in range (n + 1), i ^ 2
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 s : Finset ℕ f : ℕ → ℕ n✝ n : ℕ ⊢ ∑ i in range (n + 1), i ^ 2 = n * (n + 1) * (2 * n + 1) / 6 TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/solutions/Solutions_S02_Induction_and_Recursion.lean
sum_sqr
[27, 1]
[33, 7]
apply Nat.div_eq_of_eq_mul_right (by norm_num : 0 < 6)
α : Type u_1 s : Finset ℕ f : ℕ → ℕ n✝ n : ℕ ⊢ n * (n + 1) * (2 * n + 1) / 6 = ∑ i in range (n + 1), i ^ 2
α : Type u_1 s : Finset ℕ f : ℕ → ℕ n✝ n : ℕ ⊢ n * (n + 1) * (2 * n + 1) = 6 * ∑ i in range (n + 1), i ^ 2
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 s : Finset ℕ f : ℕ → ℕ n✝ n : ℕ ⊢ n * (n + 1) * (2 * n + 1) / 6 = ∑ i in range (n + 1), i ^ 2 TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/solutions/Solutions_S02_Induction_and_Recursion.lean
sum_sqr
[27, 1]
[33, 7]
induction' n with n ih
α : Type u_1 s : Finset ℕ f : ℕ → ℕ n✝ n : ℕ ⊢ n * (n + 1) * (2 * n + 1) = 6 * ∑ i in range (n + 1), i ^ 2
case zero α : Type u_1 s : Finset ℕ f : ℕ → ℕ n : ℕ ⊢ 0 * (0 + 1) * (2 * 0 + 1) = 6 * ∑ i in range (0 + 1), i ^ 2 case succ α : Type u_1 s : Finset ℕ f : ℕ → ℕ n✝ n : ℕ ih : n * (n + 1) * (2 * n + 1) = 6 * ∑ i in range (n + 1), i ^ 2 ⊢ (n + 1) * (n + 1 + 1) * (2 * (n + 1) + 1) = 6 * ∑ i in range (n + 1 + 1), i ^ 2
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 s : Finset ℕ f : ℕ → ℕ n✝ n : ℕ ⊢ n * (n + 1) * (2 * n + 1) = 6 * ∑ i in range (n + 1), i ^ 2 TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/solutions/Solutions_S02_Induction_and_Recursion.lean
sum_sqr
[27, 1]
[33, 7]
rw [Finset.sum_range_succ, mul_add 6, ← ih]
case succ α : Type u_1 s : Finset ℕ f : ℕ → ℕ n✝ n : ℕ ih : n * (n + 1) * (2 * n + 1) = 6 * ∑ i in range (n + 1), i ^ 2 ⊢ (n + 1) * (n + 1 + 1) * (2 * (n + 1) + 1) = 6 * ∑ i in range (n + 1 + 1), i ^ 2
case succ α : Type u_1 s : Finset ℕ f : ℕ → ℕ n✝ n : ℕ ih : n * (n + 1) * (2 * n + 1) = 6 * ∑ i in range (n + 1), i ^ 2 ⊢ (n + 1) * (n + 1 + 1) * (2 * (n + 1) + 1) = n * (n + 1) * (2 * n + 1) + 6 * (n + 1) ^ 2
Please generate a tactic in lean4 to solve the state. STATE: case succ α : Type u_1 s : Finset ℕ f : ℕ → ℕ n✝ n : ℕ ih : n * (n + 1) * (2 * n + 1) = 6 * ∑ i in range (n + 1), i ^ 2 ⊢ (n + 1) * (n + 1 + 1) * (2 * (n + 1) + 1) = 6 * ∑ i in range (n + 1 + 1), i ^ 2 TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/solutions/Solutions_S02_Induction_and_Recursion.lean
sum_sqr
[27, 1]
[33, 7]
ring
case succ α : Type u_1 s : Finset ℕ f : ℕ → ℕ n✝ n : ℕ ih : n * (n + 1) * (2 * n + 1) = 6 * ∑ i in range (n + 1), i ^ 2 ⊢ (n + 1) * (n + 1 + 1) * (2 * (n + 1) + 1) = n * (n + 1) * (2 * n + 1) + 6 * (n + 1) ^ 2
no goals
Please generate a tactic in lean4 to solve the state. STATE: case succ α : Type u_1 s : Finset ℕ f : ℕ → ℕ n✝ n : ℕ ih : n * (n + 1) * (2 * n + 1) = 6 * ∑ i in range (n + 1), i ^ 2 ⊢ (n + 1) * (n + 1 + 1) * (2 * (n + 1) + 1) = n * (n + 1) * (2 * n + 1) + 6 * (n + 1) ^ 2 TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/solutions/Solutions_S02_Induction_and_Recursion.lean
sum_sqr
[27, 1]
[33, 7]
norm_num
α : Type u_1 s : Finset ℕ f : ℕ → ℕ n✝ n : ℕ ⊢ 0 < 6
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 s : Finset ℕ f : ℕ → ℕ n✝ n : ℕ ⊢ 0 < 6 TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/solutions/Solutions_S02_Induction_and_Recursion.lean
sum_sqr
[27, 1]
[33, 7]
simp
case zero α : Type u_1 s : Finset ℕ f : ℕ → ℕ n : ℕ ⊢ 0 * (0 + 1) * (2 * 0 + 1) = 6 * ∑ i in range (0 + 1), i ^ 2
no goals
Please generate a tactic in lean4 to solve the state. STATE: case zero α : Type u_1 s : Finset ℕ f : ℕ → ℕ n : ℕ ⊢ 0 * (0 + 1) * (2 * 0 + 1) = 6 * ∑ i in range (0 + 1), i ^ 2 TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/solutions/Solutions_S02_Induction_and_Recursion.lean
MyNat.zero_add
[51, 1]
[54, 15]
induction' n with n ih
n : MyNat ⊢ add zero n = n
case zero ⊢ add zero zero = zero case succ n : MyNat ih : add zero n = n ⊢ add zero (succ n) = succ n
Please generate a tactic in lean4 to solve the state. STATE: n : MyNat ⊢ add zero n = n TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/solutions/Solutions_S02_Induction_and_Recursion.lean
MyNat.zero_add
[51, 1]
[54, 15]
rw [add, ih]
case succ n : MyNat ih : add zero n = n ⊢ add zero (succ n) = succ n
no goals
Please generate a tactic in lean4 to solve the state. STATE: case succ n : MyNat ih : add zero n = n ⊢ add zero (succ n) = succ n TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/solutions/Solutions_S02_Induction_and_Recursion.lean
MyNat.zero_add
[51, 1]
[54, 15]
rfl
case zero ⊢ add zero zero = zero
no goals
Please generate a tactic in lean4 to solve the state. STATE: case zero ⊢ add zero zero = zero TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/solutions/Solutions_S02_Induction_and_Recursion.lean
MyNat.succ_add
[56, 1]
[60, 6]
induction' n with n ih
m n : MyNat ⊢ add (succ m) n = succ (add m n)
case zero m : MyNat ⊢ add (succ m) zero = succ (add m zero) case succ m n : MyNat ih : add (succ m) n = succ (add m n) ⊢ add (succ m) (succ n) = succ (add m (succ n))
Please generate a tactic in lean4 to solve the state. STATE: m n : MyNat ⊢ add (succ m) n = succ (add m n) TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/solutions/Solutions_S02_Induction_and_Recursion.lean
MyNat.succ_add
[56, 1]
[60, 6]
rw [add, ih]
case succ m n : MyNat ih : add (succ m) n = succ (add m n) ⊢ add (succ m) (succ n) = succ (add m (succ n))
case succ m n : MyNat ih : add (succ m) n = succ (add m n) ⊢ succ (succ (add m n)) = succ (add m (succ n))
Please generate a tactic in lean4 to solve the state. STATE: case succ m n : MyNat ih : add (succ m) n = succ (add m n) ⊢ add (succ m) (succ n) = succ (add m (succ n)) TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/solutions/Solutions_S02_Induction_and_Recursion.lean
MyNat.succ_add
[56, 1]
[60, 6]
rfl
case succ m n : MyNat ih : add (succ m) n = succ (add m n) ⊢ succ (succ (add m n)) = succ (add m (succ n))
no goals
Please generate a tactic in lean4 to solve the state. STATE: case succ m n : MyNat ih : add (succ m) n = succ (add m n) ⊢ succ (succ (add m n)) = succ (add m (succ n)) TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/solutions/Solutions_S02_Induction_and_Recursion.lean
MyNat.succ_add
[56, 1]
[60, 6]
rfl
case zero m : MyNat ⊢ add (succ m) zero = succ (add m zero)
no goals
Please generate a tactic in lean4 to solve the state. STATE: case zero m : MyNat ⊢ add (succ m) zero = succ (add m zero) TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/solutions/Solutions_S02_Induction_and_Recursion.lean
MyNat.add_comm
[62, 1]
[66, 25]
induction' n with n ih
m n : MyNat ⊢ add m n = add n m
case zero m : MyNat ⊢ add m zero = add zero m case succ m n : MyNat ih : add m n = add n m ⊢ add m (succ n) = add (succ n) m
Please generate a tactic in lean4 to solve the state. STATE: m n : MyNat ⊢ add m n = add n m TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/solutions/Solutions_S02_Induction_and_Recursion.lean
MyNat.add_comm
[62, 1]
[66, 25]
rw [add, succ_add, ih]
case succ m n : MyNat ih : add m n = add n m ⊢ add m (succ n) = add (succ n) m
no goals
Please generate a tactic in lean4 to solve the state. STATE: case succ m n : MyNat ih : add m n = add n m ⊢ add m (succ n) = add (succ n) m TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/solutions/Solutions_S02_Induction_and_Recursion.lean
MyNat.add_comm
[62, 1]
[66, 25]
rw [zero_add]
case zero m : MyNat ⊢ add m zero = add zero m
case zero m : MyNat ⊢ add m zero = m
Please generate a tactic in lean4 to solve the state. STATE: case zero m : MyNat ⊢ add m zero = add zero m TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/solutions/Solutions_S02_Induction_and_Recursion.lean
MyNat.add_comm
[62, 1]
[66, 25]
rfl
case zero m : MyNat ⊢ add m zero = m
no goals
Please generate a tactic in lean4 to solve the state. STATE: case zero m : MyNat ⊢ add m zero = m TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/solutions/Solutions_S02_Induction_and_Recursion.lean
MyNat.add_assoc
[68, 1]
[72, 6]
induction' k with k ih
m n k : MyNat ⊢ add (add m n) k = add m (add n k)
case zero m n : MyNat ⊢ add (add m n) zero = add m (add n zero) case succ m n k : MyNat ih : add (add m n) k = add m (add n k) ⊢ add (add m n) (succ k) = add m (add n (succ k))
Please generate a tactic in lean4 to solve the state. STATE: m n k : MyNat ⊢ add (add m n) k = add m (add n k) TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/solutions/Solutions_S02_Induction_and_Recursion.lean
MyNat.add_assoc
[68, 1]
[72, 6]
rw [add, ih]
case succ m n k : MyNat ih : add (add m n) k = add m (add n k) ⊢ add (add m n) (succ k) = add m (add n (succ k))
case succ m n k : MyNat ih : add (add m n) k = add m (add n k) ⊢ succ (add m (add n k)) = add m (add n (succ k))
Please generate a tactic in lean4 to solve the state. STATE: case succ m n k : MyNat ih : add (add m n) k = add m (add n k) ⊢ add (add m n) (succ k) = add m (add n (succ k)) TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/solutions/Solutions_S02_Induction_and_Recursion.lean
MyNat.add_assoc
[68, 1]
[72, 6]
rfl
case succ m n k : MyNat ih : add (add m n) k = add m (add n k) ⊢ succ (add m (add n k)) = add m (add n (succ k))
no goals
Please generate a tactic in lean4 to solve the state. STATE: case succ m n k : MyNat ih : add (add m n) k = add m (add n k) ⊢ succ (add m (add n k)) = add m (add n (succ k)) TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/solutions/Solutions_S02_Induction_and_Recursion.lean
MyNat.add_assoc
[68, 1]
[72, 6]
rfl
case zero m n : MyNat ⊢ add (add m n) zero = add m (add n zero)
no goals
Please generate a tactic in lean4 to solve the state. STATE: case zero m n : MyNat ⊢ add (add m n) zero = add m (add n zero) TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/solutions/Solutions_S02_Induction_and_Recursion.lean
MyNat.mul_add
[74, 1]
[77, 36]
induction' k with k ih
m n k : MyNat ⊢ mul m (add n k) = add (mul m n) (mul m k)
case zero m n : MyNat ⊢ mul m (add n zero) = add (mul m n) (mul m zero) case succ m n k : MyNat ih : mul m (add n k) = add (mul m n) (mul m k) ⊢ mul m (add n (succ k)) = add (mul m n) (mul m (succ k))
Please generate a tactic in lean4 to solve the state. STATE: m n k : MyNat ⊢ mul m (add n k) = add (mul m n) (mul m k) TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/solutions/Solutions_S02_Induction_and_Recursion.lean
MyNat.mul_add
[74, 1]
[77, 36]
rw [add, mul, mul, ih, add_assoc]
case succ m n k : MyNat ih : mul m (add n k) = add (mul m n) (mul m k) ⊢ mul m (add n (succ k)) = add (mul m n) (mul m (succ k))
no goals
Please generate a tactic in lean4 to solve the state. STATE: case succ m n k : MyNat ih : mul m (add n k) = add (mul m n) (mul m k) ⊢ mul m (add n (succ k)) = add (mul m n) (mul m (succ k)) TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/solutions/Solutions_S02_Induction_and_Recursion.lean
MyNat.mul_add
[74, 1]
[77, 36]
rfl
case zero m n : MyNat ⊢ mul m (add n zero) = add (mul m n) (mul m zero)
no goals
Please generate a tactic in lean4 to solve the state. STATE: case zero m n : MyNat ⊢ mul m (add n zero) = add (mul m n) (mul m zero) TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/solutions/Solutions_S02_Induction_and_Recursion.lean
MyNat.zero_mul
[79, 1]
[83, 6]
induction' n with n ih
n : MyNat ⊢ mul zero n = zero
case zero ⊢ mul zero zero = zero case succ n : MyNat ih : mul zero n = zero ⊢ mul zero (succ n) = zero
Please generate a tactic in lean4 to solve the state. STATE: n : MyNat ⊢ mul zero n = zero TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/solutions/Solutions_S02_Induction_and_Recursion.lean
MyNat.zero_mul
[79, 1]
[83, 6]
rw [mul, ih]
case succ n : MyNat ih : mul zero n = zero ⊢ mul zero (succ n) = zero
case succ n : MyNat ih : mul zero n = zero ⊢ add zero zero = zero
Please generate a tactic in lean4 to solve the state. STATE: case succ n : MyNat ih : mul zero n = zero ⊢ mul zero (succ n) = zero TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/solutions/Solutions_S02_Induction_and_Recursion.lean
MyNat.zero_mul
[79, 1]
[83, 6]
rfl
case succ n : MyNat ih : mul zero n = zero ⊢ add zero zero = zero
no goals
Please generate a tactic in lean4 to solve the state. STATE: case succ n : MyNat ih : mul zero n = zero ⊢ add zero zero = zero TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/solutions/Solutions_S02_Induction_and_Recursion.lean
MyNat.zero_mul
[79, 1]
[83, 6]
rfl
case zero ⊢ mul zero zero = zero
no goals
Please generate a tactic in lean4 to solve the state. STATE: case zero ⊢ mul zero zero = zero TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/solutions/Solutions_S02_Induction_and_Recursion.lean
MyNat.succ_mul
[85, 1]
[89, 6]
induction' n with n ih
m n : MyNat ⊢ mul (succ m) n = add (mul m n) n
case zero m : MyNat ⊢ mul (succ m) zero = add (mul m zero) zero case succ m n : MyNat ih : mul (succ m) n = add (mul m n) n ⊢ mul (succ m) (succ n) = add (mul m (succ n)) (succ n)
Please generate a tactic in lean4 to solve the state. STATE: m n : MyNat ⊢ mul (succ m) n = add (mul m n) n TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/solutions/Solutions_S02_Induction_and_Recursion.lean
MyNat.succ_mul
[85, 1]
[89, 6]
rw [mul, mul, ih, add_assoc, add_assoc, add_comm n, succ_add]
case succ m n : MyNat ih : mul (succ m) n = add (mul m n) n ⊢ mul (succ m) (succ n) = add (mul m (succ n)) (succ n)
case succ m n : MyNat ih : mul (succ m) n = add (mul m n) n ⊢ add (mul m n) (succ (add m n)) = add (mul m n) (add m (succ n))
Please generate a tactic in lean4 to solve the state. STATE: case succ m n : MyNat ih : mul (succ m) n = add (mul m n) n ⊢ mul (succ m) (succ n) = add (mul m (succ n)) (succ n) TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/solutions/Solutions_S02_Induction_and_Recursion.lean
MyNat.succ_mul
[85, 1]
[89, 6]
rfl
case succ m n : MyNat ih : mul (succ m) n = add (mul m n) n ⊢ add (mul m n) (succ (add m n)) = add (mul m n) (add m (succ n))
no goals
Please generate a tactic in lean4 to solve the state. STATE: case succ m n : MyNat ih : mul (succ m) n = add (mul m n) n ⊢ add (mul m n) (succ (add m n)) = add (mul m n) (add m (succ n)) TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/solutions/Solutions_S02_Induction_and_Recursion.lean
MyNat.succ_mul
[85, 1]
[89, 6]
rfl
case zero m : MyNat ⊢ mul (succ m) zero = add (mul m zero) zero
no goals
Please generate a tactic in lean4 to solve the state. STATE: case zero m : MyNat ⊢ mul (succ m) zero = add (mul m zero) zero TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/solutions/Solutions_S02_Induction_and_Recursion.lean
MyNat.mul_comm
[91, 1]
[95, 25]
induction' n with n ih
m n : MyNat ⊢ mul m n = mul n m
case zero m : MyNat ⊢ mul m zero = mul zero m case succ m n : MyNat ih : mul m n = mul n m ⊢ mul m (succ n) = mul (succ n) m
Please generate a tactic in lean4 to solve the state. STATE: m n : MyNat ⊢ mul m n = mul n m TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/solutions/Solutions_S02_Induction_and_Recursion.lean
MyNat.mul_comm
[91, 1]
[95, 25]
rw [mul, ih, succ_mul]
case succ m n : MyNat ih : mul m n = mul n m ⊢ mul m (succ n) = mul (succ n) m
no goals
Please generate a tactic in lean4 to solve the state. STATE: case succ m n : MyNat ih : mul m n = mul n m ⊢ mul m (succ n) = mul (succ n) m TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/solutions/Solutions_S02_Induction_and_Recursion.lean
MyNat.mul_comm
[91, 1]
[95, 25]
rw [zero_mul]
case zero m : MyNat ⊢ mul m zero = mul zero m
case zero m : MyNat ⊢ mul m zero = zero
Please generate a tactic in lean4 to solve the state. STATE: case zero m : MyNat ⊢ mul m zero = mul zero m TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C05_Elementary_Number_Theory/solutions/Solutions_S02_Induction_and_Recursion.lean
MyNat.mul_comm
[91, 1]
[95, 25]
rfl
case zero m : MyNat ⊢ mul m zero = zero
no goals
Please generate a tactic in lean4 to solve the state. STATE: case zero m : MyNat ⊢ mul m zero = zero TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C03_Logic/solutions/Solutions_S05_Disjunction.lean
C03S05.MyAbs.le_abs_self
[12, 1]
[16, 13]
rcases le_or_gt 0 x with h | h
x✝ y x : ℝ ⊢ x ≤ |x|
case inl x✝ y x : ℝ h : 0 ≤ x ⊢ x ≤ |x| case inr x✝ y x : ℝ h : 0 > x ⊢ x ≤ |x|
Please generate a tactic in lean4 to solve the state. STATE: x✝ y x : ℝ ⊢ x ≤ |x| TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C03_Logic/solutions/Solutions_S05_Disjunction.lean
C03S05.MyAbs.le_abs_self
[12, 1]
[16, 13]
. rw [abs_of_neg h] linarith
case inr x✝ y x : ℝ h : 0 > x ⊢ x ≤ |x|
no goals
Please generate a tactic in lean4 to solve the state. STATE: case inr x✝ y x : ℝ h : 0 > x ⊢ x ≤ |x| TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C03_Logic/solutions/Solutions_S05_Disjunction.lean
C03S05.MyAbs.le_abs_self
[12, 1]
[16, 13]
rw [abs_of_nonneg h]
case inl x✝ y x : ℝ h : 0 ≤ x ⊢ x ≤ |x|
no goals
Please generate a tactic in lean4 to solve the state. STATE: case inl x✝ y x : ℝ h : 0 ≤ x ⊢ x ≤ |x| TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C03_Logic/solutions/Solutions_S05_Disjunction.lean
C03S05.MyAbs.le_abs_self
[12, 1]
[16, 13]
rw [abs_of_neg h]
case inr x✝ y x : ℝ h : 0 > x ⊢ x ≤ |x|
case inr x✝ y x : ℝ h : 0 > x ⊢ x ≤ -x
Please generate a tactic in lean4 to solve the state. STATE: case inr x✝ y x : ℝ h : 0 > x ⊢ x ≤ |x| TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C03_Logic/solutions/Solutions_S05_Disjunction.lean
C03S05.MyAbs.le_abs_self
[12, 1]
[16, 13]
linarith
case inr x✝ y x : ℝ h : 0 > x ⊢ x ≤ -x
no goals
Please generate a tactic in lean4 to solve the state. STATE: case inr x✝ y x : ℝ h : 0 > x ⊢ x ≤ -x TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C03_Logic/solutions/Solutions_S05_Disjunction.lean
C03S05.MyAbs.neg_le_abs_self
[18, 1]
[22, 22]
rcases le_or_gt 0 x with h | h
x✝ y x : ℝ ⊢ -x ≤ |x|
case inl x✝ y x : ℝ h : 0 ≤ x ⊢ -x ≤ |x| case inr x✝ y x : ℝ h : 0 > x ⊢ -x ≤ |x|
Please generate a tactic in lean4 to solve the state. STATE: x✝ y x : ℝ ⊢ -x ≤ |x| TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C03_Logic/solutions/Solutions_S05_Disjunction.lean
C03S05.MyAbs.neg_le_abs_self
[18, 1]
[22, 22]
. rw [abs_of_neg h]
case inr x✝ y x : ℝ h : 0 > x ⊢ -x ≤ |x|
no goals
Please generate a tactic in lean4 to solve the state. STATE: case inr x✝ y x : ℝ h : 0 > x ⊢ -x ≤ |x| TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C03_Logic/solutions/Solutions_S05_Disjunction.lean
C03S05.MyAbs.neg_le_abs_self
[18, 1]
[22, 22]
rw [abs_of_nonneg h]
case inl x✝ y x : ℝ h : 0 ≤ x ⊢ -x ≤ |x|
case inl x✝ y x : ℝ h : 0 ≤ x ⊢ -x ≤ x
Please generate a tactic in lean4 to solve the state. STATE: case inl x✝ y x : ℝ h : 0 ≤ x ⊢ -x ≤ |x| TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C03_Logic/solutions/Solutions_S05_Disjunction.lean
C03S05.MyAbs.neg_le_abs_self
[18, 1]
[22, 22]
linarith
case inl x✝ y x : ℝ h : 0 ≤ x ⊢ -x ≤ x
no goals
Please generate a tactic in lean4 to solve the state. STATE: case inl x✝ y x : ℝ h : 0 ≤ x ⊢ -x ≤ x TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C03_Logic/solutions/Solutions_S05_Disjunction.lean
C03S05.MyAbs.neg_le_abs_self
[18, 1]
[22, 22]
rw [abs_of_neg h]
case inr x✝ y x : ℝ h : 0 > x ⊢ -x ≤ |x|
no goals
Please generate a tactic in lean4 to solve the state. STATE: case inr x✝ y x : ℝ h : 0 > x ⊢ -x ≤ |x| TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C03_Logic/solutions/Solutions_S05_Disjunction.lean
C03S05.MyAbs.abs_add
[24, 1]
[29, 52]
rcases le_or_gt 0 (x + y) with h | h
x✝ y✝ x y : ℝ ⊢ |x + y| ≤ |x| + |y|
case inl x✝ y✝ x y : ℝ h : 0 ≤ x + y ⊢ |x + y| ≤ |x| + |y| case inr x✝ y✝ x y : ℝ h : 0 > x + y ⊢ |x + y| ≤ |x| + |y|
Please generate a tactic in lean4 to solve the state. STATE: x✝ y✝ x y : ℝ ⊢ |x + y| ≤ |x| + |y| TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C03_Logic/solutions/Solutions_S05_Disjunction.lean
C03S05.MyAbs.abs_add
[24, 1]
[29, 52]
. rw [abs_of_neg h] linarith [neg_le_abs_self x, neg_le_abs_self y]
case inr x✝ y✝ x y : ℝ h : 0 > x + y ⊢ |x + y| ≤ |x| + |y|
no goals
Please generate a tactic in lean4 to solve the state. STATE: case inr x✝ y✝ x y : ℝ h : 0 > x + y ⊢ |x + y| ≤ |x| + |y| TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C03_Logic/solutions/Solutions_S05_Disjunction.lean
C03S05.MyAbs.abs_add
[24, 1]
[29, 52]
rw [abs_of_nonneg h]
case inl x✝ y✝ x y : ℝ h : 0 ≤ x + y ⊢ |x + y| ≤ |x| + |y|
case inl x✝ y✝ x y : ℝ h : 0 ≤ x + y ⊢ x + y ≤ |x| + |y|
Please generate a tactic in lean4 to solve the state. STATE: case inl x✝ y✝ x y : ℝ h : 0 ≤ x + y ⊢ |x + y| ≤ |x| + |y| TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C03_Logic/solutions/Solutions_S05_Disjunction.lean
C03S05.MyAbs.abs_add
[24, 1]
[29, 52]
linarith [le_abs_self x, le_abs_self y]
case inl x✝ y✝ x y : ℝ h : 0 ≤ x + y ⊢ x + y ≤ |x| + |y|
no goals
Please generate a tactic in lean4 to solve the state. STATE: case inl x✝ y✝ x y : ℝ h : 0 ≤ x + y ⊢ x + y ≤ |x| + |y| TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C03_Logic/solutions/Solutions_S05_Disjunction.lean
C03S05.MyAbs.abs_add
[24, 1]
[29, 52]
rw [abs_of_neg h]
case inr x✝ y✝ x y : ℝ h : 0 > x + y ⊢ |x + y| ≤ |x| + |y|
case inr x✝ y✝ x y : ℝ h : 0 > x + y ⊢ -(x + y) ≤ |x| + |y|
Please generate a tactic in lean4 to solve the state. STATE: case inr x✝ y✝ x y : ℝ h : 0 > x + y ⊢ |x + y| ≤ |x| + |y| TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C03_Logic/solutions/Solutions_S05_Disjunction.lean
C03S05.MyAbs.abs_add
[24, 1]
[29, 52]
linarith [neg_le_abs_self x, neg_le_abs_self y]
case inr x✝ y✝ x y : ℝ h : 0 > x + y ⊢ -(x + y) ≤ |x| + |y|
no goals
Please generate a tactic in lean4 to solve the state. STATE: case inr x✝ y✝ x y : ℝ h : 0 > x + y ⊢ -(x + y) ≤ |x| + |y| TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C03_Logic/solutions/Solutions_S05_Disjunction.lean
C03S05.MyAbs.lt_abs
[31, 1]
[50, 15]
rcases le_or_gt 0 y with h | h
x y : ℝ ⊢ x < |y| ↔ x < y ∨ x < -y
case inl x y : ℝ h : 0 ≤ y ⊢ x < |y| ↔ x < y ∨ x < -y case inr x y : ℝ h : 0 > y ⊢ x < |y| ↔ x < y ∨ x < -y
Please generate a tactic in lean4 to solve the state. STATE: x y : ℝ ⊢ x < |y| ↔ x < y ∨ x < -y TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C03_Logic/solutions/Solutions_S05_Disjunction.lean
C03S05.MyAbs.lt_abs
[31, 1]
[50, 15]
rw [abs_of_neg h]
case inr x y : ℝ h : 0 > y ⊢ x < |y| ↔ x < y ∨ x < -y
case inr x y : ℝ h : 0 > y ⊢ x < -y ↔ x < y ∨ x < -y
Please generate a tactic in lean4 to solve the state. STATE: case inr x y : ℝ h : 0 > y ⊢ x < |y| ↔ x < y ∨ x < -y TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C03_Logic/solutions/Solutions_S05_Disjunction.lean
C03S05.MyAbs.lt_abs
[31, 1]
[50, 15]
constructor
case inr x y : ℝ h : 0 > y ⊢ x < -y ↔ x < y ∨ x < -y
case inr.mp x y : ℝ h : 0 > y ⊢ x < -y → x < y ∨ x < -y case inr.mpr x y : ℝ h : 0 > y ⊢ x < y ∨ x < -y → x < -y
Please generate a tactic in lean4 to solve the state. STATE: case inr x y : ℝ h : 0 > y ⊢ x < -y ↔ x < y ∨ x < -y TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C03_Logic/solutions/Solutions_S05_Disjunction.lean
C03S05.MyAbs.lt_abs
[31, 1]
[50, 15]
rw [abs_of_nonneg h]
case inl x y : ℝ h : 0 ≤ y ⊢ x < |y| ↔ x < y ∨ x < -y
case inl x y : ℝ h : 0 ≤ y ⊢ x < y ↔ x < y ∨ x < -y
Please generate a tactic in lean4 to solve the state. STATE: case inl x y : ℝ h : 0 ≤ y ⊢ x < |y| ↔ x < y ∨ x < -y TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C03_Logic/solutions/Solutions_S05_Disjunction.lean
C03S05.MyAbs.lt_abs
[31, 1]
[50, 15]
constructor
case inl x y : ℝ h : 0 ≤ y ⊢ x < y ↔ x < y ∨ x < -y
case inl.mp x y : ℝ h : 0 ≤ y ⊢ x < y → x < y ∨ x < -y case inl.mpr x y : ℝ h : 0 ≤ y ⊢ x < y ∨ x < -y → x < y
Please generate a tactic in lean4 to solve the state. STATE: case inl x y : ℝ h : 0 ≤ y ⊢ x < y ↔ x < y ∨ x < -y TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C03_Logic/solutions/Solutions_S05_Disjunction.lean
C03S05.MyAbs.lt_abs
[31, 1]
[50, 15]
intro h'
case inl.mp x y : ℝ h : 0 ≤ y ⊢ x < y → x < y ∨ x < -y
case inl.mp x y : ℝ h : 0 ≤ y h' : x < y ⊢ x < y ∨ x < -y
Please generate a tactic in lean4 to solve the state. STATE: case inl.mp x y : ℝ h : 0 ≤ y ⊢ x < y → x < y ∨ x < -y TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C03_Logic/solutions/Solutions_S05_Disjunction.lean
C03S05.MyAbs.lt_abs
[31, 1]
[50, 15]
left
case inl.mp x y : ℝ h : 0 ≤ y h' : x < y ⊢ x < y ∨ x < -y
case inl.mp.h x y : ℝ h : 0 ≤ y h' : x < y ⊢ x < y
Please generate a tactic in lean4 to solve the state. STATE: case inl.mp x y : ℝ h : 0 ≤ y h' : x < y ⊢ x < y ∨ x < -y TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C03_Logic/solutions/Solutions_S05_Disjunction.lean
C03S05.MyAbs.lt_abs
[31, 1]
[50, 15]
exact h'
case inl.mp.h x y : ℝ h : 0 ≤ y h' : x < y ⊢ x < y
no goals
Please generate a tactic in lean4 to solve the state. STATE: case inl.mp.h x y : ℝ h : 0 ≤ y h' : x < y ⊢ x < y TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C03_Logic/solutions/Solutions_S05_Disjunction.lean
C03S05.MyAbs.lt_abs
[31, 1]
[50, 15]
intro h'
case inl.mpr x y : ℝ h : 0 ≤ y ⊢ x < y ∨ x < -y → x < y
case inl.mpr x y : ℝ h : 0 ≤ y h' : x < y ∨ x < -y ⊢ x < y
Please generate a tactic in lean4 to solve the state. STATE: case inl.mpr x y : ℝ h : 0 ≤ y ⊢ x < y ∨ x < -y → x < y TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C03_Logic/solutions/Solutions_S05_Disjunction.lean
C03S05.MyAbs.lt_abs
[31, 1]
[50, 15]
rcases h' with h' | h'
case inl.mpr x y : ℝ h : 0 ≤ y h' : x < y ∨ x < -y ⊢ x < y
case inl.mpr.inl x y : ℝ h : 0 ≤ y h' : x < y ⊢ x < y case inl.mpr.inr x y : ℝ h : 0 ≤ y h' : x < -y ⊢ x < y
Please generate a tactic in lean4 to solve the state. STATE: case inl.mpr x y : ℝ h : 0 ≤ y h' : x < y ∨ x < -y ⊢ x < y TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C03_Logic/solutions/Solutions_S05_Disjunction.lean
C03S05.MyAbs.lt_abs
[31, 1]
[50, 15]
. linarith
case inl.mpr.inr x y : ℝ h : 0 ≤ y h' : x < -y ⊢ x < y
no goals
Please generate a tactic in lean4 to solve the state. STATE: case inl.mpr.inr x y : ℝ h : 0 ≤ y h' : x < -y ⊢ x < y TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C03_Logic/solutions/Solutions_S05_Disjunction.lean
C03S05.MyAbs.lt_abs
[31, 1]
[50, 15]
exact h'
case inl.mpr.inl x y : ℝ h : 0 ≤ y h' : x < y ⊢ x < y
no goals
Please generate a tactic in lean4 to solve the state. STATE: case inl.mpr.inl x y : ℝ h : 0 ≤ y h' : x < y ⊢ x < y TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C03_Logic/solutions/Solutions_S05_Disjunction.lean
C03S05.MyAbs.lt_abs
[31, 1]
[50, 15]
linarith
case inl.mpr.inr x y : ℝ h : 0 ≤ y h' : x < -y ⊢ x < y
no goals
Please generate a tactic in lean4 to solve the state. STATE: case inl.mpr.inr x y : ℝ h : 0 ≤ y h' : x < -y ⊢ x < y TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C03_Logic/solutions/Solutions_S05_Disjunction.lean
C03S05.MyAbs.lt_abs
[31, 1]
[50, 15]
intro h'
case inr.mp x y : ℝ h : 0 > y ⊢ x < -y → x < y ∨ x < -y
case inr.mp x y : ℝ h : 0 > y h' : x < -y ⊢ x < y ∨ x < -y
Please generate a tactic in lean4 to solve the state. STATE: case inr.mp x y : ℝ h : 0 > y ⊢ x < -y → x < y ∨ x < -y TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C03_Logic/solutions/Solutions_S05_Disjunction.lean
C03S05.MyAbs.lt_abs
[31, 1]
[50, 15]
right
case inr.mp x y : ℝ h : 0 > y h' : x < -y ⊢ x < y ∨ x < -y
case inr.mp.h x y : ℝ h : 0 > y h' : x < -y ⊢ x < -y
Please generate a tactic in lean4 to solve the state. STATE: case inr.mp x y : ℝ h : 0 > y h' : x < -y ⊢ x < y ∨ x < -y TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C03_Logic/solutions/Solutions_S05_Disjunction.lean
C03S05.MyAbs.lt_abs
[31, 1]
[50, 15]
exact h'
case inr.mp.h x y : ℝ h : 0 > y h' : x < -y ⊢ x < -y
no goals
Please generate a tactic in lean4 to solve the state. STATE: case inr.mp.h x y : ℝ h : 0 > y h' : x < -y ⊢ x < -y TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C03_Logic/solutions/Solutions_S05_Disjunction.lean
C03S05.MyAbs.lt_abs
[31, 1]
[50, 15]
intro h'
case inr.mpr x y : ℝ h : 0 > y ⊢ x < y ∨ x < -y → x < -y
case inr.mpr x y : ℝ h : 0 > y h' : x < y ∨ x < -y ⊢ x < -y
Please generate a tactic in lean4 to solve the state. STATE: case inr.mpr x y : ℝ h : 0 > y ⊢ x < y ∨ x < -y → x < -y TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C03_Logic/solutions/Solutions_S05_Disjunction.lean
C03S05.MyAbs.lt_abs
[31, 1]
[50, 15]
rcases h' with h' | h'
case inr.mpr x y : ℝ h : 0 > y h' : x < y ∨ x < -y ⊢ x < -y
case inr.mpr.inl x y : ℝ h : 0 > y h' : x < y ⊢ x < -y case inr.mpr.inr x y : ℝ h : 0 > y h' : x < -y ⊢ x < -y
Please generate a tactic in lean4 to solve the state. STATE: case inr.mpr x y : ℝ h : 0 > y h' : x < y ∨ x < -y ⊢ x < -y TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C03_Logic/solutions/Solutions_S05_Disjunction.lean
C03S05.MyAbs.lt_abs
[31, 1]
[50, 15]
. exact h'
case inr.mpr.inr x y : ℝ h : 0 > y h' : x < -y ⊢ x < -y
no goals
Please generate a tactic in lean4 to solve the state. STATE: case inr.mpr.inr x y : ℝ h : 0 > y h' : x < -y ⊢ x < -y TACTIC: