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/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
image_fn
[171, 1]
[195, 18]
ext x
⊒ fn '' Set.Icc 3 5 = Set.Icc 12 28
case h x : ℝ ⊒ x ∈ fn '' Set.Icc 3 5 ↔ x ∈ Set.Icc 12 28
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
image_fn
[171, 1]
[195, 18]
simp only [ge_iff_le, not_le, gt_iff_lt, Set.mem_image, Set.mem_Icc, fn]
case h x : ℝ ⊒ x ∈ fn '' Set.Icc 3 5 ↔ x ∈ Set.Icc 12 28
case h x : ℝ ⊒ (βˆƒ x_1, (3 ≀ x_1 ∧ x_1 ≀ 5) ∧ x_1 ^ 2 + 3 = x) ↔ 12 ≀ x ∧ x ≀ 28
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
image_fn
[171, 1]
[195, 18]
constructor
case h x : ℝ ⊒ (βˆƒ x_1, (3 ≀ x_1 ∧ x_1 ≀ 5) ∧ x_1 ^ 2 + 3 = x) ↔ 12 ≀ x ∧ x ≀ 28
case h.mp x : ℝ ⊒ (βˆƒ x_1, (3 ≀ x_1 ∧ x_1 ≀ 5) ∧ x_1 ^ 2 + 3 = x) β†’ 12 ≀ x ∧ x ≀ 28 case h.mpr x : ℝ ⊒ 12 ≀ x ∧ x ≀ 28 β†’ βˆƒ x_1, (3 ≀ x_1 ∧ x_1 ≀ 5) ∧ x_1 ^ 2 + 3 = x
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
image_fn
[171, 1]
[195, 18]
intro hex
case h.mp x : ℝ ⊒ (βˆƒ x_1, (3 ≀ x_1 ∧ x_1 ≀ 5) ∧ x_1 ^ 2 + 3 = x) β†’ 12 ≀ x ∧ x ≀ 28
case h.mp x : ℝ hex : βˆƒ x_1, (3 ≀ x_1 ∧ x_1 ≀ 5) ∧ x_1 ^ 2 + 3 = x ⊒ 12 ≀ x ∧ x ≀ 28
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
image_fn
[171, 1]
[195, 18]
rcases hex with ⟨y, ⟨⟨h3le, h5ge⟩ , hfy⟩⟩
case h.mp x : ℝ hex : βˆƒ x_1, (3 ≀ x_1 ∧ x_1 ≀ 5) ∧ x_1 ^ 2 + 3 = x ⊒ 12 ≀ x ∧ x ≀ 28
case h.mp.intro.intro.intro x y : ℝ hfy : y ^ 2 + 3 = x h3le : 3 ≀ y h5ge : y ≀ 5 ⊒ 12 ≀ x ∧ x ≀ 28
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
image_fn
[171, 1]
[195, 18]
constructor
case h.mp.intro.intro.intro x y : ℝ hfy : y ^ 2 + 3 = x h3le : 3 ≀ y h5ge : y ≀ 5 ⊒ 12 ≀ x ∧ x ≀ 28
case h.mp.intro.intro.intro.left x y : ℝ hfy : y ^ 2 + 3 = x h3le : 3 ≀ y h5ge : y ≀ 5 ⊒ 12 ≀ x case h.mp.intro.intro.intro.right x y : ℝ hfy : y ^ 2 + 3 = x h3le : 3 ≀ y h5ge : y ≀ 5 ⊒ x ≀ 28
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
image_fn
[171, 1]
[195, 18]
nlinarith
case h.mp.intro.intro.intro.left x y : ℝ hfy : y ^ 2 + 3 = x h3le : 3 ≀ y h5ge : y ≀ 5 ⊒ 12 ≀ x
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
image_fn
[171, 1]
[195, 18]
nlinarith
case h.mp.intro.intro.intro.right x y : ℝ hfy : y ^ 2 + 3 = x h3le : 3 ≀ y h5ge : y ≀ 5 ⊒ x ≀ 28
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
image_fn
[171, 1]
[195, 18]
intro hlege
case h.mpr x : ℝ ⊒ 12 ≀ x ∧ x ≀ 28 β†’ βˆƒ x_1, (3 ≀ x_1 ∧ x_1 ≀ 5) ∧ x_1 ^ 2 + 3 = x
case h.mpr x : ℝ hlege : 12 ≀ x ∧ x ≀ 28 ⊒ βˆƒ x_1, (3 ≀ x_1 ∧ x_1 ≀ 5) ∧ x_1 ^ 2 + 3 = x
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
image_fn
[171, 1]
[195, 18]
rcases hlege with ⟨h12ge, h28le⟩
case h.mpr x : ℝ hlege : 12 ≀ x ∧ x ≀ 28 ⊒ βˆƒ x_1, (3 ≀ x_1 ∧ x_1 ≀ 5) ∧ x_1 ^ 2 + 3 = x
case h.mpr.intro x : ℝ h12ge : 12 ≀ x h28le : x ≀ 28 ⊒ βˆƒ x_1, (3 ≀ x_1 ∧ x_1 ≀ 5) ∧ x_1 ^ 2 + 3 = x
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
image_fn
[171, 1]
[195, 18]
use (Real.sqrt (x - 3))
case h.mpr.intro x : ℝ h12ge : 12 ≀ x h28le : x ≀ 28 ⊒ βˆƒ x_1, (3 ≀ x_1 ∧ x_1 ≀ 5) ∧ x_1 ^ 2 + 3 = x
case h x : ℝ h12ge : 12 ≀ x h28le : x ≀ 28 ⊒ (3 ≀ Real.sqrt (x - 3) ∧ Real.sqrt (x - 3) ≀ 5) ∧ Real.sqrt (x - 3) ^ 2 + 3 = x
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
image_fn
[171, 1]
[195, 18]
constructor
case h x : ℝ h12ge : 12 ≀ x h28le : x ≀ 28 ⊒ (3 ≀ Real.sqrt (x - 3) ∧ Real.sqrt (x - 3) ≀ 5) ∧ Real.sqrt (x - 3) ^ 2 + 3 = x
case h.left x : ℝ h12ge : 12 ≀ x h28le : x ≀ 28 ⊒ 3 ≀ Real.sqrt (x - 3) ∧ Real.sqrt (x - 3) ≀ 5 case h.right x : ℝ h12ge : 12 ≀ x h28le : x ≀ 28 ⊒ Real.sqrt (x - 3) ^ 2 + 3 = x
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
image_fn
[171, 1]
[195, 18]
constructor
case h.left x : ℝ h12ge : 12 ≀ x h28le : x ≀ 28 ⊒ 3 ≀ Real.sqrt (x - 3) ∧ Real.sqrt (x - 3) ≀ 5
case h.left.left x : ℝ h12ge : 12 ≀ x h28le : x ≀ 28 ⊒ 3 ≀ Real.sqrt (x - 3) case h.left.right x : ℝ h12ge : 12 ≀ x h28le : x ≀ 28 ⊒ Real.sqrt (x - 3) ≀ 5
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
image_fn
[171, 1]
[195, 18]
refine Real.le_sqrt_of_sq_le ?h.left.left.h
case h.left.left x : ℝ h12ge : 12 ≀ x h28le : x ≀ 28 ⊒ 3 ≀ Real.sqrt (x - 3)
case h.left.left.h x : ℝ h12ge : 12 ≀ x h28le : x ≀ 28 ⊒ 3 ^ 2 ≀ x - 3
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
image_fn
[171, 1]
[195, 18]
linarith
case h.left.left.h x : ℝ h12ge : 12 ≀ x h28le : x ≀ 28 ⊒ 3 ^ 2 ≀ x - 3
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
image_fn
[171, 1]
[195, 18]
refine Real.sqrt_le_iff.mpr ?h.left.right.a
case h.left.right x : ℝ h12ge : 12 ≀ x h28le : x ≀ 28 ⊒ Real.sqrt (x - 3) ≀ 5
case h.left.right.a x : ℝ h12ge : 12 ≀ x h28le : x ≀ 28 ⊒ 0 ≀ 5 ∧ x - 3 ≀ 5 ^ 2
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
image_fn
[171, 1]
[195, 18]
constructor
case h.left.right.a x : ℝ h12ge : 12 ≀ x h28le : x ≀ 28 ⊒ 0 ≀ 5 ∧ x - 3 ≀ 5 ^ 2
case h.left.right.a.left x : ℝ h12ge : 12 ≀ x h28le : x ≀ 28 ⊒ 0 ≀ 5 case h.left.right.a.right x : ℝ h12ge : 12 ≀ x h28le : x ≀ 28 ⊒ x - 3 ≀ 5 ^ 2
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
image_fn
[171, 1]
[195, 18]
nlinarith
case h.left.right.a.left x : ℝ h12ge : 12 ≀ x h28le : x ≀ 28 ⊒ 0 ≀ 5
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
image_fn
[171, 1]
[195, 18]
nlinarith
case h.left.right.a.right x : ℝ h12ge : 12 ≀ x h28le : x ≀ 28 ⊒ x - 3 ≀ 5 ^ 2
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
image_fn
[171, 1]
[195, 18]
rw [Real.sq_sqrt]
case h.right x : ℝ h12ge : 12 ≀ x h28le : x ≀ 28 ⊒ Real.sqrt (x - 3) ^ 2 + 3 = x
case h.right x : ℝ h12ge : 12 ≀ x h28le : x ≀ 28 ⊒ x - 3 + 3 = x case h.right x : ℝ h12ge : 12 ≀ x h28le : x ≀ 28 ⊒ 0 ≀ x - 3
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
image_fn
[171, 1]
[195, 18]
nlinarith
case h.right x : ℝ h12ge : 12 ≀ x h28le : x ≀ 28 ⊒ x - 3 + 3 = x
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
image_fn
[171, 1]
[195, 18]
nlinarith
case h.right x : ℝ h12ge : 12 ≀ x h28le : x ≀ 28 ⊒ 0 ≀ x - 3
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
preimage_fn
[197, 1]
[223, 18]
ext x
⊒ fn ⁻¹' Set.Icc 12 19 = Set.Icc 3 4 βˆͺ Set.Icc (-4) (-3)
case h x : ℝ ⊒ x ∈ fn ⁻¹' Set.Icc 12 19 ↔ x ∈ Set.Icc 3 4 βˆͺ Set.Icc (-4) (-3)
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
preimage_fn
[197, 1]
[223, 18]
simp only [ge_iff_le, not_le, gt_iff_lt, Set.mem_preimage, Set.mem_Icc, neg_le_neg_iff, neg_lt_neg_iff, Set.mem_union, fn]
case h x : ℝ ⊒ x ∈ fn ⁻¹' Set.Icc 12 19 ↔ x ∈ Set.Icc 3 4 βˆͺ Set.Icc (-4) (-3)
case h x : ℝ ⊒ 12 ≀ x ^ 2 + 3 ∧ x ^ 2 + 3 ≀ 19 ↔ 3 ≀ x ∧ x ≀ 4 ∨ -4 ≀ x ∧ x ≀ -3
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
preimage_fn
[197, 1]
[223, 18]
constructor
case h x : ℝ ⊒ 12 ≀ x ^ 2 + 3 ∧ x ^ 2 + 3 ≀ 19 ↔ 3 ≀ x ∧ x ≀ 4 ∨ -4 ≀ x ∧ x ≀ -3
case h.mp x : ℝ ⊒ 12 ≀ x ^ 2 + 3 ∧ x ^ 2 + 3 ≀ 19 β†’ 3 ≀ x ∧ x ≀ 4 ∨ -4 ≀ x ∧ x ≀ -3 case h.mpr x : ℝ ⊒ 3 ≀ x ∧ x ≀ 4 ∨ -4 ≀ x ∧ x ≀ -3 β†’ 12 ≀ x ^ 2 + 3 ∧ x ^ 2 + 3 ≀ 19
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
preimage_fn
[197, 1]
[223, 18]
intro hlege
case h.mp x : ℝ ⊒ 12 ≀ x ^ 2 + 3 ∧ x ^ 2 + 3 ≀ 19 β†’ 3 ≀ x ∧ x ≀ 4 ∨ -4 ≀ x ∧ x ≀ -3
case h.mp x : ℝ hlege : 12 ≀ x ^ 2 + 3 ∧ x ^ 2 + 3 ≀ 19 ⊒ 3 ≀ x ∧ x ≀ 4 ∨ -4 ≀ x ∧ x ≀ -3
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
preimage_fn
[197, 1]
[223, 18]
rcases hlege with ⟨h12le, h19ge⟩
case h.mp x : ℝ hlege : 12 ≀ x ^ 2 + 3 ∧ x ^ 2 + 3 ≀ 19 ⊒ 3 ≀ x ∧ x ≀ 4 ∨ -4 ≀ x ∧ x ≀ -3
case h.mp.intro x : ℝ h12le : 12 ≀ x ^ 2 + 3 h19ge : x ^ 2 + 3 ≀ 19 ⊒ 3 ≀ x ∧ x ≀ 4 ∨ -4 ≀ x ∧ x ≀ -3
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
preimage_fn
[197, 1]
[223, 18]
have heq12 : (12 : ℝ) = (3^2) + 3 := by ring
case h.mp.intro x : ℝ h12le : 12 ≀ x ^ 2 + 3 h19ge : x ^ 2 + 3 ≀ 19 ⊒ 3 ≀ x ∧ x ≀ 4 ∨ -4 ≀ x ∧ x ≀ -3
case h.mp.intro x : ℝ h12le : 12 ≀ x ^ 2 + 3 h19ge : x ^ 2 + 3 ≀ 19 heq12 : 12 = 3 ^ 2 + 3 ⊒ 3 ≀ x ∧ x ≀ 4 ∨ -4 ≀ x ∧ x ≀ -3
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
preimage_fn
[197, 1]
[223, 18]
rw [heq12, add_le_add_iff_right, sq_le_sq, abs_of_pos (by simp), le_abs, le_neg] at h12le
case h.mp.intro x : ℝ h12le : 12 ≀ x ^ 2 + 3 h19ge : x ^ 2 + 3 ≀ 19 heq12 : 12 = 3 ^ 2 + 3 ⊒ 3 ≀ x ∧ x ≀ 4 ∨ -4 ≀ x ∧ x ≀ -3
case h.mp.intro x : ℝ h12le : 3 ≀ x ∨ x ≀ -3 h19ge : x ^ 2 + 3 ≀ 19 heq12 : 12 = 3 ^ 2 + 3 ⊒ 3 ≀ x ∧ x ≀ 4 ∨ -4 ≀ x ∧ x ≀ -3
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
preimage_fn
[197, 1]
[223, 18]
have heq19 : (19 : ℝ) = (4^2) + 3 := by ring
case h.mp.intro x : ℝ h12le : 3 ≀ x ∨ x ≀ -3 h19ge : x ^ 2 + 3 ≀ 19 heq12 : 12 = 3 ^ 2 + 3 ⊒ 3 ≀ x ∧ x ≀ 4 ∨ -4 ≀ x ∧ x ≀ -3
case h.mp.intro x : ℝ h12le : 3 ≀ x ∨ x ≀ -3 h19ge : x ^ 2 + 3 ≀ 19 heq12 : 12 = 3 ^ 2 + 3 heq19 : 19 = 4 ^ 2 + 3 ⊒ 3 ≀ x ∧ x ≀ 4 ∨ -4 ≀ x ∧ x ≀ -3
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
preimage_fn
[197, 1]
[223, 18]
have lt04 : (0 : ℝ) < 4 := by simp
case h.mp.intro x : ℝ h12le : 3 ≀ x ∨ x ≀ -3 h19ge : x ^ 2 + 3 ≀ 19 heq12 : 12 = 3 ^ 2 + 3 heq19 : 19 = 4 ^ 2 + 3 ⊒ 3 ≀ x ∧ x ≀ 4 ∨ -4 ≀ x ∧ x ≀ -3
case h.mp.intro x : ℝ h12le : 3 ≀ x ∨ x ≀ -3 h19ge : x ^ 2 + 3 ≀ 19 heq12 : 12 = 3 ^ 2 + 3 heq19 : 19 = 4 ^ 2 + 3 lt04 : 0 < 4 ⊒ 3 ≀ x ∧ x ≀ 4 ∨ -4 ≀ x ∧ x ≀ -3
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
preimage_fn
[197, 1]
[223, 18]
rw [heq19, add_le_add_iff_right, sq_le_sq, abs_of_pos lt04, abs_le] at h19ge
case h.mp.intro x : ℝ h12le : 3 ≀ x ∨ x ≀ -3 h19ge : x ^ 2 + 3 ≀ 19 heq12 : 12 = 3 ^ 2 + 3 heq19 : 19 = 4 ^ 2 + 3 lt04 : 0 < 4 ⊒ 3 ≀ x ∧ x ≀ 4 ∨ -4 ≀ x ∧ x ≀ -3
case h.mp.intro x : ℝ h12le : 3 ≀ x ∨ x ≀ -3 h19ge : -4 ≀ x ∧ x ≀ 4 heq12 : 12 = 3 ^ 2 + 3 heq19 : 19 = 4 ^ 2 + 3 lt04 : 0 < 4 ⊒ 3 ≀ x ∧ x ≀ 4 ∨ -4 ≀ x ∧ x ≀ -3
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
preimage_fn
[197, 1]
[223, 18]
rcases h12le with (h3le | hm3ge)
case h.mp.intro x : ℝ h12le : 3 ≀ x ∨ x ≀ -3 h19ge : -4 ≀ x ∧ x ≀ 4 heq12 : 12 = 3 ^ 2 + 3 heq19 : 19 = 4 ^ 2 + 3 lt04 : 0 < 4 ⊒ 3 ≀ x ∧ x ≀ 4 ∨ -4 ≀ x ∧ x ≀ -3
case h.mp.intro.inl x : ℝ h19ge : -4 ≀ x ∧ x ≀ 4 heq12 : 12 = 3 ^ 2 + 3 heq19 : 19 = 4 ^ 2 + 3 lt04 : 0 < 4 h3le : 3 ≀ x ⊒ 3 ≀ x ∧ x ≀ 4 ∨ -4 ≀ x ∧ x ≀ -3 case h.mp.intro.inr x : ℝ h19ge : -4 ≀ x ∧ x ≀ 4 heq12 : 12 = 3 ^ 2 + 3 heq19 : 19 = 4 ^ 2 + 3 lt04 : 0 < 4 hm3ge : x ≀ -3 ⊒ 3 ≀ x ∧ x ≀ 4 ∨ -4 ≀ x ∧ x ≀ -3
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
preimage_fn
[197, 1]
[223, 18]
ring
x : ℝ h12le : 12 ≀ x ^ 2 + 3 h19ge : x ^ 2 + 3 ≀ 19 ⊒ 12 = 3 ^ 2 + 3
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
preimage_fn
[197, 1]
[223, 18]
simp
x : ℝ h12le : |3| ≀ |x| h19ge : x ^ 2 + 3 ≀ 19 heq12 : 12 = 3 ^ 2 + 3 ⊒ 0 < 3
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
preimage_fn
[197, 1]
[223, 18]
ring
x : ℝ h12le : 3 ≀ x ∨ x ≀ -3 h19ge : x ^ 2 + 3 ≀ 19 heq12 : 12 = 3 ^ 2 + 3 ⊒ 19 = 4 ^ 2 + 3
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
preimage_fn
[197, 1]
[223, 18]
simp
x : ℝ h12le : 3 ≀ x ∨ x ≀ -3 h19ge : x ^ 2 + 3 ≀ 19 heq12 : 12 = 3 ^ 2 + 3 heq19 : 19 = 4 ^ 2 + 3 ⊒ 0 < 4
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
preimage_fn
[197, 1]
[223, 18]
left
case h.mp.intro.inl x : ℝ h19ge : -4 ≀ x ∧ x ≀ 4 heq12 : 12 = 3 ^ 2 + 3 heq19 : 19 = 4 ^ 2 + 3 lt04 : 0 < 4 h3le : 3 ≀ x ⊒ 3 ≀ x ∧ x ≀ 4 ∨ -4 ≀ x ∧ x ≀ -3
case h.mp.intro.inl.h x : ℝ h19ge : -4 ≀ x ∧ x ≀ 4 heq12 : 12 = 3 ^ 2 + 3 heq19 : 19 = 4 ^ 2 + 3 lt04 : 0 < 4 h3le : 3 ≀ x ⊒ 3 ≀ x ∧ x ≀ 4
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
preimage_fn
[197, 1]
[223, 18]
exact ⟨h3le, h19ge.2⟩
case h.mp.intro.inl.h x : ℝ h19ge : -4 ≀ x ∧ x ≀ 4 heq12 : 12 = 3 ^ 2 + 3 heq19 : 19 = 4 ^ 2 + 3 lt04 : 0 < 4 h3le : 3 ≀ x ⊒ 3 ≀ x ∧ x ≀ 4
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
preimage_fn
[197, 1]
[223, 18]
right
case h.mp.intro.inr x : ℝ h19ge : -4 ≀ x ∧ x ≀ 4 heq12 : 12 = 3 ^ 2 + 3 heq19 : 19 = 4 ^ 2 + 3 lt04 : 0 < 4 hm3ge : x ≀ -3 ⊒ 3 ≀ x ∧ x ≀ 4 ∨ -4 ≀ x ∧ x ≀ -3
case h.mp.intro.inr.h x : ℝ h19ge : -4 ≀ x ∧ x ≀ 4 heq12 : 12 = 3 ^ 2 + 3 heq19 : 19 = 4 ^ 2 + 3 lt04 : 0 < 4 hm3ge : x ≀ -3 ⊒ -4 ≀ x ∧ x ≀ -3
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
preimage_fn
[197, 1]
[223, 18]
exact ⟨h19ge.1, hm3ge⟩
case h.mp.intro.inr.h x : ℝ h19ge : -4 ≀ x ∧ x ≀ 4 heq12 : 12 = 3 ^ 2 + 3 heq19 : 19 = 4 ^ 2 + 3 lt04 : 0 < 4 hm3ge : x ≀ -3 ⊒ -4 ≀ x ∧ x ≀ -3
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
preimage_fn
[197, 1]
[223, 18]
intro hlege
case h.mpr x : ℝ ⊒ 3 ≀ x ∧ x ≀ 4 ∨ -4 ≀ x ∧ x ≀ -3 β†’ 12 ≀ x ^ 2 + 3 ∧ x ^ 2 + 3 ≀ 19
case h.mpr x : ℝ hlege : 3 ≀ x ∧ x ≀ 4 ∨ -4 ≀ x ∧ x ≀ -3 ⊒ 12 ≀ x ^ 2 + 3 ∧ x ^ 2 + 3 ≀ 19
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
preimage_fn
[197, 1]
[223, 18]
rcases hlege with (⟨h3le, h4ge⟩ | ⟨hm4le, hm3ge⟩)
case h.mpr x : ℝ hlege : 3 ≀ x ∧ x ≀ 4 ∨ -4 ≀ x ∧ x ≀ -3 ⊒ 12 ≀ x ^ 2 + 3 ∧ x ^ 2 + 3 ≀ 19
case h.mpr.inl.intro x : ℝ h3le : 3 ≀ x h4ge : x ≀ 4 ⊒ 12 ≀ x ^ 2 + 3 ∧ x ^ 2 + 3 ≀ 19 case h.mpr.inr.intro x : ℝ hm4le : -4 ≀ x hm3ge : x ≀ -3 ⊒ 12 ≀ x ^ 2 + 3 ∧ x ^ 2 + 3 ≀ 19
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
preimage_fn
[197, 1]
[223, 18]
constructor
case h.mpr.inl.intro x : ℝ h3le : 3 ≀ x h4ge : x ≀ 4 ⊒ 12 ≀ x ^ 2 + 3 ∧ x ^ 2 + 3 ≀ 19
case h.mpr.inl.intro.left x : ℝ h3le : 3 ≀ x h4ge : x ≀ 4 ⊒ 12 ≀ x ^ 2 + 3 case h.mpr.inl.intro.right x : ℝ h3le : 3 ≀ x h4ge : x ≀ 4 ⊒ x ^ 2 + 3 ≀ 19
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
preimage_fn
[197, 1]
[223, 18]
nlinarith
case h.mpr.inl.intro.left x : ℝ h3le : 3 ≀ x h4ge : x ≀ 4 ⊒ 12 ≀ x ^ 2 + 3
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
preimage_fn
[197, 1]
[223, 18]
nlinarith
case h.mpr.inl.intro.right x : ℝ h3le : 3 ≀ x h4ge : x ≀ 4 ⊒ x ^ 2 + 3 ≀ 19
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
preimage_fn
[197, 1]
[223, 18]
constructor
case h.mpr.inr.intro x : ℝ hm4le : -4 ≀ x hm3ge : x ≀ -3 ⊒ 12 ≀ x ^ 2 + 3 ∧ x ^ 2 + 3 ≀ 19
case h.mpr.inr.intro.left x : ℝ hm4le : -4 ≀ x hm3ge : x ≀ -3 ⊒ 12 ≀ x ^ 2 + 3 case h.mpr.inr.intro.right x : ℝ hm4le : -4 ≀ x hm3ge : x ≀ -3 ⊒ x ^ 2 + 3 ≀ 19
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
preimage_fn
[197, 1]
[223, 18]
nlinarith
case h.mpr.inr.intro.left x : ℝ hm4le : -4 ≀ x hm3ge : x ≀ -3 ⊒ 12 ≀ x ^ 2 + 3
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
preimage_fn
[197, 1]
[223, 18]
nlinarith
case h.mpr.inr.intro.right x : ℝ hm4le : -4 ≀ x hm3ge : x ≀ -3 ⊒ x ^ 2 + 3 ≀ 19
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
inter_image_fun_inter_subset
[226, 1]
[238, 10]
simp only [Set.subset_inter_iff, Set.image_subset_iff, Set.subset_def]
Ξ± Ξ² : Type X Y : Set Ξ± f : Ξ± β†’ Ξ² ⊒ f '' (X ∩ Y) βŠ† f '' X ∩ f '' Y
Ξ± Ξ² : Type X Y : Set Ξ± f : Ξ± β†’ Ξ² ⊒ βˆ€ x ∈ f '' (X ∩ Y), x ∈ f '' X ∩ f '' Y
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
inter_image_fun_inter_subset
[226, 1]
[238, 10]
simp [Set.subset_def]
Ξ± Ξ² : Type X Y : Set Ξ± f : Ξ± β†’ Ξ² ⊒ βˆ€ x ∈ f '' (X ∩ Y), x ∈ f '' X ∩ f '' Y
Ξ± Ξ² : Type X Y : Set Ξ± f : Ξ± β†’ Ξ² ⊒ βˆ€ (x : Ξ²), βˆ€ x_1 ∈ X, x_1 ∈ Y β†’ f x_1 = x β†’ (βˆƒ x_2 ∈ X, f x_2 = x) ∧ βˆƒ x_2 ∈ Y, f x_2 = x
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
inter_image_fun_inter_subset
[226, 1]
[238, 10]
intros a b bmemX bmemY img
Ξ± Ξ² : Type X Y : Set Ξ± f : Ξ± β†’ Ξ² ⊒ βˆ€ (x : Ξ²), βˆ€ x_1 ∈ X, x_1 ∈ Y β†’ f x_1 = x β†’ (βˆƒ x_2 ∈ X, f x_2 = x) ∧ βˆƒ x_2 ∈ Y, f x_2 = x
Ξ± Ξ² : Type X Y : Set Ξ± f : Ξ± β†’ Ξ² a : Ξ² b : Ξ± bmemX : b ∈ X bmemY : b ∈ Y img : f b = a ⊒ (βˆƒ x ∈ X, f x = a) ∧ βˆƒ x ∈ Y, f x = a
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
inter_image_fun_inter_subset
[226, 1]
[238, 10]
constructor
Ξ± Ξ² : Type X Y : Set Ξ± f : Ξ± β†’ Ξ² a : Ξ² b : Ξ± bmemX : b ∈ X bmemY : b ∈ Y img : f b = a ⊒ (βˆƒ x ∈ X, f x = a) ∧ βˆƒ x ∈ Y, f x = a
case left Ξ± Ξ² : Type X Y : Set Ξ± f : Ξ± β†’ Ξ² a : Ξ² b : Ξ± bmemX : b ∈ X bmemY : b ∈ Y img : f b = a ⊒ βˆƒ x ∈ X, f x = a case right Ξ± Ξ² : Type X Y : Set Ξ± f : Ξ± β†’ Ξ² a : Ξ² b : Ξ± bmemX : b ∈ X bmemY : b ∈ Y img : f b = a ⊒ βˆƒ x ∈ Y, f x = a
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
inter_image_fun_inter_subset
[226, 1]
[238, 10]
use b
case left Ξ± Ξ² : Type X Y : Set Ξ± f : Ξ± β†’ Ξ² a : Ξ² b : Ξ± bmemX : b ∈ X bmemY : b ∈ Y img : f b = a ⊒ βˆƒ x ∈ X, f x = a
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
inter_image_fun_inter_subset
[226, 1]
[238, 10]
use b
case right Ξ± Ξ² : Type X Y : Set Ξ± f : Ξ± β†’ Ξ² a : Ξ² b : Ξ± bmemX : b ∈ X bmemY : b ∈ Y img : f b = a ⊒ βˆƒ x ∈ Y, f x = a
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
inter_image_fun_inter_not_eq
[241, 1]
[263, 37]
use (β„€)
⊒ βˆƒ Ξ± Ξ² f X Y, f '' (X ∩ Y) β‰  f '' X ∩ f '' Y
case h ⊒ βˆƒ Ξ² f X Y, f '' (X ∩ Y) β‰  f '' X ∩ f '' Y
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
inter_image_fun_inter_not_eq
[241, 1]
[263, 37]
use (β„€)
case h ⊒ βˆƒ Ξ² f X Y, f '' (X ∩ Y) β‰  f '' X ∩ f '' Y
case h ⊒ βˆƒ f X Y, f '' (X ∩ Y) β‰  f '' X ∩ f '' Y
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
inter_image_fun_inter_not_eq
[241, 1]
[263, 37]
use (Ξ» _ => 0)
case h ⊒ βˆƒ f X Y, f '' (X ∩ Y) β‰  f '' X ∩ f '' Y
case h ⊒ βˆƒ X Y, (fun x => 0) '' (X ∩ Y) β‰  (fun x => 0) '' X ∩ (fun x => 0) '' Y
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
inter_image_fun_inter_not_eq
[241, 1]
[263, 37]
use ({1} : Set β„€)
case h ⊒ βˆƒ X Y, (fun x => 0) '' (X ∩ Y) β‰  (fun x => 0) '' X ∩ (fun x => 0) '' Y
case h ⊒ βˆƒ Y, (fun x => 0) '' ({1} ∩ Y) β‰  (fun x => 0) '' {1} ∩ (fun x => 0) '' Y
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
inter_image_fun_inter_not_eq
[241, 1]
[263, 37]
use ({2} : Set β„€)
case h ⊒ βˆƒ Y, (fun x => 0) '' ({1} ∩ Y) β‰  (fun x => 0) '' {1} ∩ (fun x => 0) '' Y
case h ⊒ (fun x => 0) '' ({1} ∩ {2}) β‰  (fun x => 0) '' {1} ∩ (fun x => 0) '' {2}
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
inter_image_fun_inter_not_eq
[241, 1]
[263, 37]
simp only [Set.inter_singleton_nonempty, Set.image_singleton, Set.inter_self, ne_eq]
case h ⊒ (fun x => 0) '' ({1} ∩ {2}) β‰  (fun x => 0) '' {1} ∩ (fun x => 0) '' {2}
case h ⊒ ¬(fun x => 0) '' ({1} ∩ {2}) = {0}
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
inter_image_fun_inter_not_eq
[241, 1]
[263, 37]
intro heq
case h ⊒ ¬(fun x => 0) '' ({1} ∩ {2}) = {0}
case h heq : (fun x => 0) '' ({1} ∩ {2}) = {0} ⊒ False
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
inter_image_fun_inter_not_eq
[241, 1]
[263, 37]
rw [Set.inter_def] at heq
case h heq : (fun x => 0) '' ({1} ∩ {2}) = {0} ⊒ False
case h heq : (fun x => 0) '' {a | a ∈ {1} ∧ a ∈ {2}} = {0} ⊒ False
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
inter_image_fun_inter_not_eq
[241, 1]
[263, 37]
simp at heq
case h heq : (fun x => 0) '' {a | a ∈ {1} ∧ a ∈ {2}} = {0} ⊒ False
case h heq : (fun x => 0) '' {a | a = 1 ∧ a = 2} = {0} ⊒ False
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
inter_image_fun_inter_not_eq
[241, 1]
[263, 37]
have hf {a : β„€} : (a = 1 ∧ a = 2) = False := by simp_all only [eq_iff_iff, iff_false, not_and, OfNat.one_ne_ofNat, not_false_eq_true, implies_true]
case h heq : (fun x => 0) '' {a | a = 1 ∧ a = 2} = {0} ⊒ False
case h heq : (fun x => 0) '' {a | a = 1 ∧ a = 2} = {0} hf : βˆ€ {a : β„€}, (a = 1 ∧ a = 2) = False ⊒ False
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
inter_image_fun_inter_not_eq
[241, 1]
[263, 37]
simp_rw [hf] at heq
case h heq : (fun x => 0) '' {a | a = 1 ∧ a = 2} = {0} hf : βˆ€ {a : β„€}, (a = 1 ∧ a = 2) = False ⊒ False
case h hf : βˆ€ {a : β„€}, (a = 1 ∧ a = 2) = False heq : (fun x => 0) '' {a | False} = {0} ⊒ False
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
inter_image_fun_inter_not_eq
[241, 1]
[263, 37]
simp at heq
case h hf : βˆ€ {a : β„€}, (a = 1 ∧ a = 2) = False heq : (fun x => 0) '' {a | False} = {0} ⊒ False
case h hf : βˆ€ {a : β„€}, (a = 1 ∧ a = 2) = False heq : βˆ… = {0} ⊒ False
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
inter_image_fun_inter_not_eq
[241, 1]
[263, 37]
symm at heq
case h hf : βˆ€ {a : β„€}, (a = 1 ∧ a = 2) = False heq : βˆ… = {0} ⊒ False
case h hf : βˆ€ {a : β„€}, (a = 1 ∧ a = 2) = False heq : {0} = βˆ… ⊒ False
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
inter_image_fun_inter_not_eq
[241, 1]
[263, 37]
exact Set.singleton_ne_empty 0 heq
case h hf : βˆ€ {a : β„€}, (a = 1 ∧ a = 2) = False heq : {0} = βˆ… ⊒ False
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
inter_image_fun_inter_not_eq
[241, 1]
[263, 37]
simp_all only [eq_iff_iff, iff_false, not_and, OfNat.one_ne_ofNat, not_false_eq_true, implies_true]
heq : (fun x => 0) '' {a | a = 1 ∧ a = 2} = {0} a : β„€ ⊒ (a = 1 ∧ a = 2) = False
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
bijective_fn
[274, 1]
[290, 12]
rw [Function.Bijective, Function.Injective, Function.Surjective]
⊒ Function.Bijective bij_fun
⊒ (βˆ€ ⦃a₁ aβ‚‚ : ℝ⦄, bij_fun a₁ = bij_fun aβ‚‚ β†’ a₁ = aβ‚‚) ∧ βˆ€ (b : { x // x > Real.sqrt 2 }), βˆƒ a, bij_fun a = b
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
bijective_fn
[274, 1]
[290, 12]
simp only [Subtype.forall, ge_iff_le]
⊒ (βˆ€ ⦃a₁ aβ‚‚ : ℝ⦄, bij_fun a₁ = bij_fun aβ‚‚ β†’ a₁ = aβ‚‚) ∧ βˆ€ (b : { x // x > Real.sqrt 2 }), βˆƒ a, bij_fun a = b
⊒ (βˆ€ ⦃a₁ aβ‚‚ : ℝ⦄, bij_fun a₁ = bij_fun aβ‚‚ β†’ a₁ = aβ‚‚) ∧ βˆ€ (a : ℝ) (b : a > Real.sqrt 2), βˆƒ a_1, bij_fun a_1 = { val := a, property := b }
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
bijective_fn
[274, 1]
[290, 12]
constructor
⊒ (βˆ€ ⦃a₁ aβ‚‚ : ℝ⦄, bij_fun a₁ = bij_fun aβ‚‚ β†’ a₁ = aβ‚‚) ∧ βˆ€ (a : ℝ) (b : a > Real.sqrt 2), βˆƒ a_1, bij_fun a_1 = { val := a, property := b }
case left ⊒ βˆ€ ⦃a₁ aβ‚‚ : ℝ⦄, bij_fun a₁ = bij_fun aβ‚‚ β†’ a₁ = aβ‚‚ case right ⊒ βˆ€ (a : ℝ) (b : a > Real.sqrt 2), βˆƒ a_1, bij_fun a_1 = { val := a, property := b }
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
bijective_fn
[274, 1]
[290, 12]
intros a b heq
case left ⊒ βˆ€ ⦃a₁ aβ‚‚ : ℝ⦄, bij_fun a₁ = bij_fun aβ‚‚ β†’ a₁ = aβ‚‚
case left a b : ℝ heq : bij_fun a = bij_fun b ⊒ a = b
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
bijective_fn
[274, 1]
[290, 12]
simp_rw [bij_fun] at heq
case left a b : ℝ heq : bij_fun a = bij_fun b ⊒ a = b
case left a b : ℝ heq : { val := Real.exp a + Real.sqrt 2, property := (_ : Real.exp a + Real.sqrt 2 > Real.sqrt 2) } = { val := Real.exp b + Real.sqrt 2, property := (_ : Real.exp b + Real.sqrt 2 > Real.sqrt 2) } ⊒ a = b
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
bijective_fn
[274, 1]
[290, 12]
apply_fun(Ξ» e => Real.log (e - Real.sqrt 2)) at heq
case left a b : ℝ heq : { val := Real.exp a + Real.sqrt 2, property := (_ : Real.exp a + Real.sqrt 2 > Real.sqrt 2) } = { val := Real.exp b + Real.sqrt 2, property := (_ : Real.exp b + Real.sqrt 2 > Real.sqrt 2) } ⊒ a = b
case left a b : ℝ heq : Real.log (↑{ val := Real.exp a + Real.sqrt 2, property := (_ : Real.exp a + Real.sqrt 2 > Real.sqrt 2) } - Real.sqrt 2) = Real.log (↑{ val := Real.exp b + Real.sqrt 2, property := (_ : Real.exp b + Real.sqrt 2 > Real.sqrt 2) } - Real.sqrt 2) ⊒ a = b
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
bijective_fn
[274, 1]
[290, 12]
simp only [add_sub_cancel, Real.log_exp] at heq
case left a b : ℝ heq : Real.log (↑{ val := Real.exp a + Real.sqrt 2, property := (_ : Real.exp a + Real.sqrt 2 > Real.sqrt 2) } - Real.sqrt 2) = Real.log (↑{ val := Real.exp b + Real.sqrt 2, property := (_ : Real.exp b + Real.sqrt 2 > Real.sqrt 2) } - Real.sqrt 2) ⊒ a = b
case left a b : ℝ heq : a = b ⊒ a = b
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
bijective_fn
[274, 1]
[290, 12]
exact heq
case left a b : ℝ heq : a = b ⊒ a = b
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
bijective_fn
[274, 1]
[290, 12]
intros x hle
case right ⊒ βˆ€ (a : ℝ) (b : a > Real.sqrt 2), βˆƒ a_1, bij_fun a_1 = { val := a, property := b }
case right x : ℝ hle : x > Real.sqrt 2 ⊒ βˆƒ a, bij_fun a = { val := x, property := hle }
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
bijective_fn
[274, 1]
[290, 12]
simp_rw [bij_fun]
case right x : ℝ hle : x > Real.sqrt 2 ⊒ βˆƒ a, bij_fun a = { val := x, property := hle }
case right x : ℝ hle : x > Real.sqrt 2 ⊒ βˆƒ a, { val := Real.exp a + Real.sqrt 2, property := (_ : Real.exp a + Real.sqrt 2 > Real.sqrt 2) } = { val := x, property := hle }
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
bijective_fn
[274, 1]
[290, 12]
use (Real.log (x - Real.sqrt 2))
case right x : ℝ hle : x > Real.sqrt 2 ⊒ βˆƒ a, { val := Real.exp a + Real.sqrt 2, property := (_ : Real.exp a + Real.sqrt 2 > Real.sqrt 2) } = { val := x, property := hle }
case h x : ℝ hle : x > Real.sqrt 2 ⊒ { val := Real.exp (Real.log (x - Real.sqrt 2)) + Real.sqrt 2, property := (_ : Real.exp (Real.log (x - Real.sqrt 2)) + Real.sqrt 2 > Real.sqrt 2) } = { val := x, property := hle }
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
bijective_fn
[274, 1]
[290, 12]
simp only [Subtype.mk.injEq]
case h x : ℝ hle : x > Real.sqrt 2 ⊒ { val := Real.exp (Real.log (x - Real.sqrt 2)) + Real.sqrt 2, property := (_ : Real.exp (Real.log (x - Real.sqrt 2)) + Real.sqrt 2 > Real.sqrt 2) } = { val := x, property := hle }
case h x : ℝ hle : x > Real.sqrt 2 ⊒ Real.exp (Real.log (x - Real.sqrt 2)) + Real.sqrt 2 = x
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
bijective_fn
[274, 1]
[290, 12]
rw [Real.exp_log (by linarith)]
case h x : ℝ hle : x > Real.sqrt 2 ⊒ Real.exp (Real.log (x - Real.sqrt 2)) + Real.sqrt 2 = x
case h x : ℝ hle : x > Real.sqrt 2 ⊒ x - Real.sqrt 2 + Real.sqrt 2 = x
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
bijective_fn
[274, 1]
[290, 12]
ring_nf
case h x : ℝ hle : x > Real.sqrt 2 ⊒ x - Real.sqrt 2 + Real.sqrt 2 = x
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
bijective_fn
[274, 1]
[290, 12]
linarith
x : ℝ hle : x > Real.sqrt 2 ⊒ 0 < x - Real.sqrt 2
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
two_pow_three_pow_unique_factorization'
[295, 1]
[327, 21]
intro hfac
m n q p : β„• h₁ : p ≀ m hβ‚‚ : q ≀ n ⊒ 2 ^ m * 3 ^ n = 2 ^ p * 3 ^ q β†’ m = p ∧ n = q
m n q p : β„• h₁ : p ≀ m hβ‚‚ : q ≀ n hfac : 2 ^ m * 3 ^ n = 2 ^ p * 3 ^ q ⊒ m = p ∧ n = q
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
two_pow_three_pow_unique_factorization'
[295, 1]
[327, 21]
have hdvd3 : 3 ^ q ∣ 2 ^ m * 3 ^ n := by exact dvd_mul_of_dvd_right (pow_dvd_pow 3 hβ‚‚) (2 ^ m)
m n q p : β„• h₁ : p ≀ m hβ‚‚ : q ≀ n hfac : 2 ^ m * 3 ^ n = 2 ^ p * 3 ^ q ⊒ m = p ∧ n = q
m n q p : β„• h₁ : p ≀ m hβ‚‚ : q ≀ n hfac : 2 ^ m * 3 ^ n = 2 ^ p * 3 ^ q hdvd3 : 3 ^ q ∣ 2 ^ m * 3 ^ n ⊒ m = p ∧ n = q
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
two_pow_three_pow_unique_factorization'
[295, 1]
[327, 21]
rw [←Nat.div_eq_iff_eq_mul_left (by simp) hdvd3, Nat.mul_div_assoc (2^m) (by rw [pow_dvd_pow_iff (by simp) (by simp)]; exact hβ‚‚), Nat.pow_div hβ‚‚ (by simp)] at hfac
m n q p : β„• h₁ : p ≀ m hβ‚‚ : q ≀ n hfac : 2 ^ m * 3 ^ n = 2 ^ p * 3 ^ q hdvd3 : 3 ^ q ∣ 2 ^ m * 3 ^ n ⊒ m = p ∧ n = q
m n q p : β„• h₁ : p ≀ m hβ‚‚ : q ≀ n hfac : 2 ^ m * 3 ^ (n - q) = 2 ^ p hdvd3 : 3 ^ q ∣ 2 ^ m * 3 ^ n ⊒ m = p ∧ n = q
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
two_pow_three_pow_unique_factorization'
[295, 1]
[327, 21]
rw [mul_comm, ←one_mul (2^p)] at hfac
m n q p : β„• h₁ : p ≀ m hβ‚‚ : q ≀ n hfac : 2 ^ m * 3 ^ (n - q) = 2 ^ p hdvd3 : 3 ^ q ∣ 2 ^ m * 3 ^ n ⊒ m = p ∧ n = q
m n q p : β„• h₁ : p ≀ m hβ‚‚ : q ≀ n hfac : 3 ^ (n - q) * 2 ^ m = 1 * 2 ^ p hdvd3 : 3 ^ q ∣ 2 ^ m * 3 ^ n ⊒ m = p ∧ n = q
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
two_pow_three_pow_unique_factorization'
[295, 1]
[327, 21]
have hdvd2 : 2 ^ p ∣ 3 ^ (n - q) * 2 ^ m := by exact dvd_mul_of_dvd_right (pow_dvd_pow 2 h₁) (3 ^ (n - q))
m n q p : β„• h₁ : p ≀ m hβ‚‚ : q ≀ n hfac : 3 ^ (n - q) * 2 ^ m = 1 * 2 ^ p hdvd3 : 3 ^ q ∣ 2 ^ m * 3 ^ n ⊒ m = p ∧ n = q
m n q p : β„• h₁ : p ≀ m hβ‚‚ : q ≀ n hfac : 3 ^ (n - q) * 2 ^ m = 1 * 2 ^ p hdvd3 : 3 ^ q ∣ 2 ^ m * 3 ^ n hdvd2 : 2 ^ p ∣ 3 ^ (n - q) * 2 ^ m ⊒ m = p ∧ n = q
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
two_pow_three_pow_unique_factorization'
[295, 1]
[327, 21]
rw [←Nat.div_eq_iff_eq_mul_left (by simp) hdvd2, Nat.mul_div_assoc (3^(n-q)) (by rw [pow_dvd_pow_iff (by simp) (by simp)]; exact h₁), Nat.pow_div h₁ (by simp)] at hfac
m n q p : β„• h₁ : p ≀ m hβ‚‚ : q ≀ n hfac : 3 ^ (n - q) * 2 ^ m = 1 * 2 ^ p hdvd3 : 3 ^ q ∣ 2 ^ m * 3 ^ n hdvd2 : 2 ^ p ∣ 3 ^ (n - q) * 2 ^ m ⊒ m = p ∧ n = q
m n q p : β„• h₁ : p ≀ m hβ‚‚ : q ≀ n hfac : 3 ^ (n - q) * 2 ^ (m - p) = 1 hdvd3 : 3 ^ q ∣ 2 ^ m * 3 ^ n hdvd2 : 2 ^ p ∣ 3 ^ (n - q) * 2 ^ m ⊒ m = p ∧ n = q
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
two_pow_three_pow_unique_factorization'
[295, 1]
[327, 21]
rw [mul_eq_one_iff' (Nat.one_le_pow' (n - q) 2) (Nat.one_le_two_pow (m - p))] at hfac
m n q p : β„• h₁ : p ≀ m hβ‚‚ : q ≀ n hfac : 3 ^ (n - q) * 2 ^ (m - p) = 1 hdvd3 : 3 ^ q ∣ 2 ^ m * 3 ^ n hdvd2 : 2 ^ p ∣ 3 ^ (n - q) * 2 ^ m ⊒ m = p ∧ n = q
m n q p : β„• h₁ : p ≀ m hβ‚‚ : q ≀ n hfac : (2 + 1) ^ (n - q) = 1 ∧ 2 ^ (m - p) = 1 hdvd3 : 3 ^ q ∣ 2 ^ m * 3 ^ n hdvd2 : 2 ^ p ∣ 3 ^ (n - q) * 2 ^ m ⊒ m = p ∧ n = q
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
two_pow_three_pow_unique_factorization'
[295, 1]
[327, 21]
rcases hfac with ⟨h3, h2⟩
m n q p : β„• h₁ : p ≀ m hβ‚‚ : q ≀ n hfac : (2 + 1) ^ (n - q) = 1 ∧ 2 ^ (m - p) = 1 hdvd3 : 3 ^ q ∣ 2 ^ m * 3 ^ n hdvd2 : 2 ^ p ∣ 3 ^ (n - q) * 2 ^ m ⊒ m = p ∧ n = q
case intro m n q p : β„• h₁ : p ≀ m hβ‚‚ : q ≀ n hdvd3 : 3 ^ q ∣ 2 ^ m * 3 ^ n hdvd2 : 2 ^ p ∣ 3 ^ (n - q) * 2 ^ m h3 : (2 + 1) ^ (n - q) = 1 h2 : 2 ^ (m - p) = 1 ⊒ m = p ∧ n = q
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
two_pow_three_pow_unique_factorization'
[295, 1]
[327, 21]
ring_nf at *
case intro m n q p : β„• h₁ : p ≀ m hβ‚‚ : q ≀ n hdvd3 : 3 ^ q ∣ 2 ^ m * 3 ^ n hdvd2 : 2 ^ p ∣ 3 ^ (n - q) * 2 ^ m h3 : (2 + 1) ^ (n - q) = 1 h2 : 2 ^ (m - p) = 1 ⊒ m = p ∧ n = q
case intro m n q p : β„• h₁ : p ≀ m hβ‚‚ : q ≀ n hdvd3 : 3 ^ q ∣ 2 ^ m * 3 ^ n h2 : 2 ^ (m - p) = 1 h3 : 3 ^ (n - q) = 1 hdvd2 : 2 ^ p ∣ 2 ^ m * 3 ^ (n - q) ⊒ m = p ∧ n = q
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
two_pow_three_pow_unique_factorization'
[295, 1]
[327, 21]
apply_fun (Ξ» e => Nat.log 2 e) at h2
case intro m n q p : β„• h₁ : p ≀ m hβ‚‚ : q ≀ n hdvd3 : 3 ^ q ∣ 2 ^ m * 3 ^ n h2 : 2 ^ (m - p) = 1 h3 : 3 ^ (n - q) = 1 hdvd2 : 2 ^ p ∣ 2 ^ m * 3 ^ (n - q) ⊒ m = p ∧ n = q
case intro m n q p : β„• h₁ : p ≀ m hβ‚‚ : q ≀ n hdvd3 : 3 ^ q ∣ 2 ^ m * 3 ^ n h3 : 3 ^ (n - q) = 1 hdvd2 : 2 ^ p ∣ 2 ^ m * 3 ^ (n - q) h2 : Nat.log 2 (2 ^ (m - p)) = Nat.log 2 1 ⊒ m = p ∧ n = q
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
two_pow_three_pow_unique_factorization'
[295, 1]
[327, 21]
rw [Nat.log_pow (by simp)] at h2
case intro m n q p : β„• h₁ : p ≀ m hβ‚‚ : q ≀ n hdvd3 : 3 ^ q ∣ 2 ^ m * 3 ^ n h3 : 3 ^ (n - q) = 1 hdvd2 : 2 ^ p ∣ 2 ^ m * 3 ^ (n - q) h2 : Nat.log 2 (2 ^ (m - p)) = Nat.log 2 1 ⊒ m = p ∧ n = q
case intro m n q p : β„• h₁ : p ≀ m hβ‚‚ : q ≀ n hdvd3 : 3 ^ q ∣ 2 ^ m * 3 ^ n h3 : 3 ^ (n - q) = 1 hdvd2 : 2 ^ p ∣ 2 ^ m * 3 ^ (n - q) h2 : m - p = Nat.log 2 1 ⊒ m = p ∧ n = q
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
two_pow_three_pow_unique_factorization'
[295, 1]
[327, 21]
simp at h2
case intro m n q p : β„• h₁ : p ≀ m hβ‚‚ : q ≀ n hdvd3 : 3 ^ q ∣ 2 ^ m * 3 ^ n h3 : 3 ^ (n - q) = 1 hdvd2 : 2 ^ p ∣ 2 ^ m * 3 ^ (n - q) h2 : m - p = Nat.log 2 1 ⊒ m = p ∧ n = q
case intro m n q p : β„• h₁ : p ≀ m hβ‚‚ : q ≀ n hdvd3 : 3 ^ q ∣ 2 ^ m * 3 ^ n h3 : 3 ^ (n - q) = 1 hdvd2 : 2 ^ p ∣ 2 ^ m * 3 ^ (n - q) h2 : m ≀ p ⊒ m = p ∧ n = q
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
two_pow_three_pow_unique_factorization'
[295, 1]
[327, 21]
have heq₁ : m = p := by linarith
case intro m n q p : β„• h₁ : p ≀ m hβ‚‚ : q ≀ n hdvd3 : 3 ^ q ∣ 2 ^ m * 3 ^ n h3 : 3 ^ (n - q) = 1 hdvd2 : 2 ^ p ∣ 2 ^ m * 3 ^ (n - q) h2 : m ≀ p ⊒ m = p ∧ n = q
case intro m n q p : β„• h₁ : p ≀ m hβ‚‚ : q ≀ n hdvd3 : 3 ^ q ∣ 2 ^ m * 3 ^ n h3 : 3 ^ (n - q) = 1 hdvd2 : 2 ^ p ∣ 2 ^ m * 3 ^ (n - q) h2 : m ≀ p heq₁ : m = p ⊒ m = p ∧ n = q
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
two_pow_three_pow_unique_factorization'
[295, 1]
[327, 21]
apply_fun (Ξ» e => Nat.log 3 e) at h3
case intro m n q p : β„• h₁ : p ≀ m hβ‚‚ : q ≀ n hdvd3 : 3 ^ q ∣ 2 ^ m * 3 ^ n h3 : 3 ^ (n - q) = 1 hdvd2 : 2 ^ p ∣ 2 ^ m * 3 ^ (n - q) h2 : m ≀ p heq₁ : m = p ⊒ m = p ∧ n = q
case intro m n q p : β„• h₁ : p ≀ m hβ‚‚ : q ≀ n hdvd3 : 3 ^ q ∣ 2 ^ m * 3 ^ n hdvd2 : 2 ^ p ∣ 2 ^ m * 3 ^ (n - q) h2 : m ≀ p heq₁ : m = p h3 : Nat.log 3 (3 ^ (n - q)) = Nat.log 3 1 ⊒ m = p ∧ n = q
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex4.lean
two_pow_three_pow_unique_factorization'
[295, 1]
[327, 21]
rw [Nat.log_pow (by simp)] at h3
case intro m n q p : β„• h₁ : p ≀ m hβ‚‚ : q ≀ n hdvd3 : 3 ^ q ∣ 2 ^ m * 3 ^ n hdvd2 : 2 ^ p ∣ 2 ^ m * 3 ^ (n - q) h2 : m ≀ p heq₁ : m = p h3 : Nat.log 3 (3 ^ (n - q)) = Nat.log 3 1 ⊒ m = p ∧ n = q
case intro m n q p : β„• h₁ : p ≀ m hβ‚‚ : q ≀ n hdvd3 : 3 ^ q ∣ 2 ^ m * 3 ^ n hdvd2 : 2 ^ p ∣ 2 ^ m * 3 ^ (n - q) h2 : m ≀ p heq₁ : m = p h3 : n - q = Nat.log 3 1 ⊒ m = p ∧ n = q