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 | Dictionary.lean | ordered_insert_is_ordered | [117, 1] | [155, 27] | rw [insert'] | case cons
α : Type
hl : LinearOrder α
inst✝ : DecidableRel LE.le
a x : α
xs : List α
ih : List.Pairwise LE.le xs → List.Pairwise LE.le (insert' a xs)
ordered : List.Pairwise LE.le (x :: xs)
⊢ List.Pairwise LE.le (insert' a (x :: xs)) | case cons
α : Type
hl : LinearOrder α
inst✝ : DecidableRel LE.le
a x : α
xs : List α
ih : List.Pairwise LE.le xs → List.Pairwise LE.le (insert' a xs)
ordered : List.Pairwise LE.le (x :: xs)
⊢ List.Pairwise LE.le (if a ≤ x then a :: x :: xs else x :: insert' a xs) |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | Dictionary.lean | ordered_insert_is_ordered | [117, 1] | [155, 27] | split_ifs with h | case cons
α : Type
hl : LinearOrder α
inst✝ : DecidableRel LE.le
a x : α
xs : List α
ih : List.Pairwise LE.le xs → List.Pairwise LE.le (insert' a xs)
ordered : List.Pairwise LE.le (x :: xs)
⊢ List.Pairwise LE.le (if a ≤ x then a :: x :: xs else x :: insert' a xs) | case pos
α : Type
hl : LinearOrder α
inst✝ : DecidableRel LE.le
a x : α
xs : List α
ih : List.Pairwise LE.le xs → List.Pairwise LE.le (insert' a xs)
ordered : List.Pairwise LE.le (x :: xs)
h : a ≤ x
⊢ List.Pairwise LE.le (a :: x :: xs)
case neg
α : Type
hl : LinearOrder α
inst✝ : DecidableRel LE.le
a x : α
xs : List α
ih : List.Pairwise LE.le xs → List.Pairwise LE.le (insert' a xs)
ordered : List.Pairwise LE.le (x :: xs)
h : ¬a ≤ x
⊢ List.Pairwise LE.le (x :: insert' a xs) |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | Dictionary.lean | ordered_insert_is_ordered | [117, 1] | [155, 27] | rw [List.pairwise_cons] | case pos
α : Type
hl : LinearOrder α
inst✝ : DecidableRel LE.le
a x : α
xs : List α
ih : List.Pairwise LE.le xs → List.Pairwise LE.le (insert' a xs)
ordered : List.Pairwise LE.le (x :: xs)
h : a ≤ x
⊢ List.Pairwise LE.le (a :: x :: xs) | case pos
α : Type
hl : LinearOrder α
inst✝ : DecidableRel LE.le
a x : α
xs : List α
ih : List.Pairwise LE.le xs → List.Pairwise LE.le (insert' a xs)
ordered : List.Pairwise LE.le (x :: xs)
h : a ≤ x
⊢ (∀ a' ∈ x :: xs, a ≤ a') ∧ List.Pairwise LE.le (x :: xs) |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | Dictionary.lean | ordered_insert_is_ordered | [117, 1] | [155, 27] | constructor | case pos
α : Type
hl : LinearOrder α
inst✝ : DecidableRel LE.le
a x : α
xs : List α
ih : List.Pairwise LE.le xs → List.Pairwise LE.le (insert' a xs)
ordered : List.Pairwise LE.le (x :: xs)
h : a ≤ x
⊢ (∀ a' ∈ x :: xs, a ≤ a') ∧ List.Pairwise LE.le (x :: xs) | case pos.left
α : Type
hl : LinearOrder α
inst✝ : DecidableRel LE.le
a x : α
xs : List α
ih : List.Pairwise LE.le xs → List.Pairwise LE.le (insert' a xs)
ordered : List.Pairwise LE.le (x :: xs)
h : a ≤ x
⊢ ∀ a' ∈ x :: xs, a ≤ a'
case pos.right
α : Type
hl : LinearOrder α
inst✝ : DecidableRel LE.le
a x : α
xs : List α
ih : List.Pairwise LE.le xs → List.Pairwise LE.le (insert' a xs)
ordered : List.Pairwise LE.le (x :: xs)
h : a ≤ x
⊢ List.Pairwise LE.le (x :: xs) |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | Dictionary.lean | ordered_insert_is_ordered | [117, 1] | [155, 27] | intro y hy | case pos.left
α : Type
hl : LinearOrder α
inst✝ : DecidableRel LE.le
a x : α
xs : List α
ih : List.Pairwise LE.le xs → List.Pairwise LE.le (insert' a xs)
ordered : List.Pairwise LE.le (x :: xs)
h : a ≤ x
⊢ ∀ a' ∈ x :: xs, a ≤ a' | case pos.left
α : Type
hl : LinearOrder α
inst✝ : DecidableRel LE.le
a x : α
xs : List α
ih : List.Pairwise LE.le xs → List.Pairwise LE.le (insert' a xs)
ordered : List.Pairwise LE.le (x :: xs)
h : a ≤ x
y : α
hy : y ∈ x :: xs
⊢ a ≤ y |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | Dictionary.lean | ordered_insert_is_ordered | [117, 1] | [155, 27] | rw [List.mem_cons] at hy | case pos.left
α : Type
hl : LinearOrder α
inst✝ : DecidableRel LE.le
a x : α
xs : List α
ih : List.Pairwise LE.le xs → List.Pairwise LE.le (insert' a xs)
ordered : List.Pairwise LE.le (x :: xs)
h : a ≤ x
y : α
hy : y ∈ x :: xs
⊢ a ≤ y | case pos.left
α : Type
hl : LinearOrder α
inst✝ : DecidableRel LE.le
a x : α
xs : List α
ih : List.Pairwise LE.le xs → List.Pairwise LE.le (insert' a xs)
ordered : List.Pairwise LE.le (x :: xs)
h : a ≤ x
y : α
hy : y = x ∨ y ∈ xs
⊢ a ≤ y |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | Dictionary.lean | ordered_insert_is_ordered | [117, 1] | [155, 27] | rcases hy with (heq | hmem) | case pos.left
α : Type
hl : LinearOrder α
inst✝ : DecidableRel LE.le
a x : α
xs : List α
ih : List.Pairwise LE.le xs → List.Pairwise LE.le (insert' a xs)
ordered : List.Pairwise LE.le (x :: xs)
h : a ≤ x
y : α
hy : y = x ∨ y ∈ xs
⊢ a ≤ y | case pos.left.inl
α : Type
hl : LinearOrder α
inst✝ : DecidableRel LE.le
a x : α
xs : List α
ih : List.Pairwise LE.le xs → List.Pairwise LE.le (insert' a xs)
ordered : List.Pairwise LE.le (x :: xs)
h : a ≤ x
y : α
heq : y = x
⊢ a ≤ y
case pos.left.inr
α : Type
hl : LinearOrder α
inst✝ : DecidableRel LE.le
a x : α
xs : List α
ih : List.Pairwise LE.le xs → List.Pairwise LE.le (insert' a xs)
ordered : List.Pairwise LE.le (x :: xs)
h : a ≤ x
y : α
hmem : y ∈ xs
⊢ a ≤ y |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | Dictionary.lean | ordered_insert_is_ordered | [117, 1] | [155, 27] | rw [heq] | case pos.left.inl
α : Type
hl : LinearOrder α
inst✝ : DecidableRel LE.le
a x : α
xs : List α
ih : List.Pairwise LE.le xs → List.Pairwise LE.le (insert' a xs)
ordered : List.Pairwise LE.le (x :: xs)
h : a ≤ x
y : α
heq : y = x
⊢ a ≤ y | case pos.left.inl
α : Type
hl : LinearOrder α
inst✝ : DecidableRel LE.le
a x : α
xs : List α
ih : List.Pairwise LE.le xs → List.Pairwise LE.le (insert' a xs)
ordered : List.Pairwise LE.le (x :: xs)
h : a ≤ x
y : α
heq : y = x
⊢ a ≤ x |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | Dictionary.lean | ordered_insert_is_ordered | [117, 1] | [155, 27] | exact h | case pos.left.inl
α : Type
hl : LinearOrder α
inst✝ : DecidableRel LE.le
a x : α
xs : List α
ih : List.Pairwise LE.le xs → List.Pairwise LE.le (insert' a xs)
ordered : List.Pairwise LE.le (x :: xs)
h : a ≤ x
y : α
heq : y = x
⊢ a ≤ x | no goals |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | Dictionary.lean | ordered_insert_is_ordered | [117, 1] | [155, 27] | rw [List.pairwise_cons] at ordered | case pos.left.inr
α : Type
hl : LinearOrder α
inst✝ : DecidableRel LE.le
a x : α
xs : List α
ih : List.Pairwise LE.le xs → List.Pairwise LE.le (insert' a xs)
ordered : List.Pairwise LE.le (x :: xs)
h : a ≤ x
y : α
hmem : y ∈ xs
⊢ a ≤ y | case pos.left.inr
α : Type
hl : LinearOrder α
inst✝ : DecidableRel LE.le
a x : α
xs : List α
ih : List.Pairwise LE.le xs → List.Pairwise LE.le (insert' a xs)
ordered : (∀ a' ∈ xs, x ≤ a') ∧ List.Pairwise LE.le xs
h : a ≤ x
y : α
hmem : y ∈ xs
⊢ a ≤ y |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | Dictionary.lean | ordered_insert_is_ordered | [117, 1] | [155, 27] | have hle := ordered.1 y hmem | case pos.left.inr
α : Type
hl : LinearOrder α
inst✝ : DecidableRel LE.le
a x : α
xs : List α
ih : List.Pairwise LE.le xs → List.Pairwise LE.le (insert' a xs)
ordered : (∀ a' ∈ xs, x ≤ a') ∧ List.Pairwise LE.le xs
h : a ≤ x
y : α
hmem : y ∈ xs
⊢ a ≤ y | case pos.left.inr
α : Type
hl : LinearOrder α
inst✝ : DecidableRel LE.le
a x : α
xs : List α
ih : List.Pairwise LE.le xs → List.Pairwise LE.le (insert' a xs)
ordered : (∀ a' ∈ xs, x ≤ a') ∧ List.Pairwise LE.le xs
h : a ≤ x
y : α
hmem : y ∈ xs
hle : x ≤ y
⊢ a ≤ y |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | Dictionary.lean | ordered_insert_is_ordered | [117, 1] | [155, 27] | exact ge_trans hle h | case pos.left.inr
α : Type
hl : LinearOrder α
inst✝ : DecidableRel LE.le
a x : α
xs : List α
ih : List.Pairwise LE.le xs → List.Pairwise LE.le (insert' a xs)
ordered : (∀ a' ∈ xs, x ≤ a') ∧ List.Pairwise LE.le xs
h : a ≤ x
y : α
hmem : y ∈ xs
hle : x ≤ y
⊢ a ≤ y | no goals |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | Dictionary.lean | ordered_insert_is_ordered | [117, 1] | [155, 27] | exact ordered | case pos.right
α : Type
hl : LinearOrder α
inst✝ : DecidableRel LE.le
a x : α
xs : List α
ih : List.Pairwise LE.le xs → List.Pairwise LE.le (insert' a xs)
ordered : List.Pairwise LE.le (x :: xs)
h : a ≤ x
⊢ List.Pairwise LE.le (x :: xs) | no goals |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | Dictionary.lean | ordered_insert_is_ordered | [117, 1] | [155, 27] | rw [List.pairwise_cons] | case neg
α : Type
hl : LinearOrder α
inst✝ : DecidableRel LE.le
a x : α
xs : List α
ih : List.Pairwise LE.le xs → List.Pairwise LE.le (insert' a xs)
ordered : List.Pairwise LE.le (x :: xs)
h : ¬a ≤ x
⊢ List.Pairwise LE.le (x :: insert' a xs) | case neg
α : Type
hl : LinearOrder α
inst✝ : DecidableRel LE.le
a x : α
xs : List α
ih : List.Pairwise LE.le xs → List.Pairwise LE.le (insert' a xs)
ordered : List.Pairwise LE.le (x :: xs)
h : ¬a ≤ x
⊢ (∀ a' ∈ insert' a xs, x ≤ a') ∧ List.Pairwise LE.le (insert' a xs) |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | Dictionary.lean | ordered_insert_is_ordered | [117, 1] | [155, 27] | rw [List.pairwise_cons] at ordered | case neg
α : Type
hl : LinearOrder α
inst✝ : DecidableRel LE.le
a x : α
xs : List α
ih : List.Pairwise LE.le xs → List.Pairwise LE.le (insert' a xs)
ordered : List.Pairwise LE.le (x :: xs)
h : ¬a ≤ x
⊢ (∀ a' ∈ insert' a xs, x ≤ a') ∧ List.Pairwise LE.le (insert' a xs) | case neg
α : Type
hl : LinearOrder α
inst✝ : DecidableRel LE.le
a x : α
xs : List α
ih : List.Pairwise LE.le xs → List.Pairwise LE.le (insert' a xs)
ordered : (∀ a' ∈ xs, x ≤ a') ∧ List.Pairwise LE.le xs
h : ¬a ≤ x
⊢ (∀ a' ∈ insert' a xs, x ≤ a') ∧ List.Pairwise LE.le (insert' a xs) |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | Dictionary.lean | ordered_insert_is_ordered | [117, 1] | [155, 27] | constructor | case neg
α : Type
hl : LinearOrder α
inst✝ : DecidableRel LE.le
a x : α
xs : List α
ih : List.Pairwise LE.le xs → List.Pairwise LE.le (insert' a xs)
ordered : (∀ a' ∈ xs, x ≤ a') ∧ List.Pairwise LE.le xs
h : ¬a ≤ x
⊢ (∀ a' ∈ insert' a xs, x ≤ a') ∧ List.Pairwise LE.le (insert' a xs) | case neg.left
α : Type
hl : LinearOrder α
inst✝ : DecidableRel LE.le
a x : α
xs : List α
ih : List.Pairwise LE.le xs → List.Pairwise LE.le (insert' a xs)
ordered : (∀ a' ∈ xs, x ≤ a') ∧ List.Pairwise LE.le xs
h : ¬a ≤ x
⊢ ∀ a' ∈ insert' a xs, x ≤ a'
case neg.right
α : Type
hl : LinearOrder α
inst✝ : DecidableRel LE.le
a x : α
xs : List α
ih : List.Pairwise LE.le xs → List.Pairwise LE.le (insert' a xs)
ordered : (∀ a' ∈ xs, x ≤ a') ∧ List.Pairwise LE.le xs
h : ¬a ≤ x
⊢ List.Pairwise LE.le (insert' a xs) |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | Dictionary.lean | ordered_insert_is_ordered | [117, 1] | [155, 27] | intros y hy | case neg.left
α : Type
hl : LinearOrder α
inst✝ : DecidableRel LE.le
a x : α
xs : List α
ih : List.Pairwise LE.le xs → List.Pairwise LE.le (insert' a xs)
ordered : (∀ a' ∈ xs, x ≤ a') ∧ List.Pairwise LE.le xs
h : ¬a ≤ x
⊢ ∀ a' ∈ insert' a xs, x ≤ a' | case neg.left
α : Type
hl : LinearOrder α
inst✝ : DecidableRel LE.le
a x : α
xs : List α
ih : List.Pairwise LE.le xs → List.Pairwise LE.le (insert' a xs)
ordered : (∀ a' ∈ xs, x ≤ a') ∧ List.Pairwise LE.le xs
h : ¬a ≤ x
y : α
hy : y ∈ insert' a xs
⊢ x ≤ y |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | Dictionary.lean | ordered_insert_is_ordered | [117, 1] | [155, 27] | rw [insert_mem] at hy | case neg.left
α : Type
hl : LinearOrder α
inst✝ : DecidableRel LE.le
a x : α
xs : List α
ih : List.Pairwise LE.le xs → List.Pairwise LE.le (insert' a xs)
ordered : (∀ a' ∈ xs, x ≤ a') ∧ List.Pairwise LE.le xs
h : ¬a ≤ x
y : α
hy : y ∈ insert' a xs
⊢ x ≤ y | case neg.left
α : Type
hl : LinearOrder α
inst✝ : DecidableRel LE.le
a x : α
xs : List α
ih : List.Pairwise LE.le xs → List.Pairwise LE.le (insert' a xs)
ordered : (∀ a' ∈ xs, x ≤ a') ∧ List.Pairwise LE.le xs
h : ¬a ≤ x
y : α
hy : y = a ∨ y ∈ xs
⊢ x ≤ y |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | Dictionary.lean | ordered_insert_is_ordered | [117, 1] | [155, 27] | rcases hy with (heq | hmem) | case neg.left
α : Type
hl : LinearOrder α
inst✝ : DecidableRel LE.le
a x : α
xs : List α
ih : List.Pairwise LE.le xs → List.Pairwise LE.le (insert' a xs)
ordered : (∀ a' ∈ xs, x ≤ a') ∧ List.Pairwise LE.le xs
h : ¬a ≤ x
y : α
hy : y = a ∨ y ∈ xs
⊢ x ≤ y | case neg.left.inl
α : Type
hl : LinearOrder α
inst✝ : DecidableRel LE.le
a x : α
xs : List α
ih : List.Pairwise LE.le xs → List.Pairwise LE.le (insert' a xs)
ordered : (∀ a' ∈ xs, x ≤ a') ∧ List.Pairwise LE.le xs
h : ¬a ≤ x
y : α
heq : y = a
⊢ x ≤ y
case neg.left.inr
α : Type
hl : LinearOrder α
inst✝ : DecidableRel LE.le
a x : α
xs : List α
ih : List.Pairwise LE.le xs → List.Pairwise LE.le (insert' a xs)
ordered : (∀ a' ∈ xs, x ≤ a') ∧ List.Pairwise LE.le xs
h : ¬a ≤ x
y : α
hmem : y ∈ xs
⊢ x ≤ y |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | Dictionary.lean | ordered_insert_is_ordered | [117, 1] | [155, 27] | rw [heq] | case neg.left.inl
α : Type
hl : LinearOrder α
inst✝ : DecidableRel LE.le
a x : α
xs : List α
ih : List.Pairwise LE.le xs → List.Pairwise LE.le (insert' a xs)
ordered : (∀ a' ∈ xs, x ≤ a') ∧ List.Pairwise LE.le xs
h : ¬a ≤ x
y : α
heq : y = a
⊢ x ≤ y | case neg.left.inl
α : Type
hl : LinearOrder α
inst✝ : DecidableRel LE.le
a x : α
xs : List α
ih : List.Pairwise LE.le xs → List.Pairwise LE.le (insert' a xs)
ordered : (∀ a' ∈ xs, x ≤ a') ∧ List.Pairwise LE.le xs
h : ¬a ≤ x
y : α
heq : y = a
⊢ x ≤ a |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | Dictionary.lean | ordered_insert_is_ordered | [117, 1] | [155, 27] | rw [not_le] at h | case neg.left.inl
α : Type
hl : LinearOrder α
inst✝ : DecidableRel LE.le
a x : α
xs : List α
ih : List.Pairwise LE.le xs → List.Pairwise LE.le (insert' a xs)
ordered : (∀ a' ∈ xs, x ≤ a') ∧ List.Pairwise LE.le xs
h : ¬a ≤ x
y : α
heq : y = a
⊢ x ≤ a | case neg.left.inl
α : Type
hl : LinearOrder α
inst✝ : DecidableRel LE.le
a x : α
xs : List α
ih : List.Pairwise LE.le xs → List.Pairwise LE.le (insert' a xs)
ordered : (∀ a' ∈ xs, x ≤ a') ∧ List.Pairwise LE.le xs
h : x < a
y : α
heq : y = a
⊢ x ≤ a |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | Dictionary.lean | ordered_insert_is_ordered | [117, 1] | [155, 27] | exact le_of_lt h | case neg.left.inl
α : Type
hl : LinearOrder α
inst✝ : DecidableRel LE.le
a x : α
xs : List α
ih : List.Pairwise LE.le xs → List.Pairwise LE.le (insert' a xs)
ordered : (∀ a' ∈ xs, x ≤ a') ∧ List.Pairwise LE.le xs
h : x < a
y : α
heq : y = a
⊢ x ≤ a | no goals |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | Dictionary.lean | ordered_insert_is_ordered | [117, 1] | [155, 27] | exact ordered.1 y hmem | case neg.left.inr
α : Type
hl : LinearOrder α
inst✝ : DecidableRel LE.le
a x : α
xs : List α
ih : List.Pairwise LE.le xs → List.Pairwise LE.le (insert' a xs)
ordered : (∀ a' ∈ xs, x ≤ a') ∧ List.Pairwise LE.le xs
h : ¬a ≤ x
y : α
hmem : y ∈ xs
⊢ x ≤ y | no goals |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | Dictionary.lean | ordered_insert_is_ordered | [117, 1] | [155, 27] | exact ih ordered.2 | case neg.right
α : Type
hl : LinearOrder α
inst✝ : DecidableRel LE.le
a x : α
xs : List α
ih : List.Pairwise LE.le xs → List.Pairwise LE.le (insert' a xs)
ordered : (∀ a' ∈ xs, x ≤ a') ∧ List.Pairwise LE.le xs
h : ¬a ≤ x
⊢ List.Pairwise LE.le (insert' a xs) | no goals |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | equiv_if_evens | [37, 1] | [47, 10] | intros ex ey | x y : ℤ
⊢ Even x → Even y → equiv_rel x y | x y : ℤ
ex : Even x
ey : Even y
⊢ equiv_rel x y |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | equiv_if_evens | [37, 1] | [47, 10] | simp [equiv_rel, Even] at * | x y : ℤ
ex : Even x
ey : Even y
⊢ equiv_rel x y | x y : ℤ
ex : ∃ r, x = r + r
ey : ∃ r, y = r + r
⊢ ∃ r, x ^ 2 + y ^ 2 = r + r |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | equiv_if_evens | [37, 1] | [47, 10] | rcases ex with ⟨a, ha⟩ | x y : ℤ
ex : ∃ r, x = r + r
ey : ∃ r, y = r + r
⊢ ∃ r, x ^ 2 + y ^ 2 = r + r | case intro
x y : ℤ
ey : ∃ r, y = r + r
a : ℤ
ha : x = a + a
⊢ ∃ r, x ^ 2 + y ^ 2 = r + r |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | equiv_if_evens | [37, 1] | [47, 10] | rcases ey with ⟨b, hb⟩ | case intro
x y : ℤ
ey : ∃ r, y = r + r
a : ℤ
ha : x = a + a
⊢ ∃ r, x ^ 2 + y ^ 2 = r + r | case intro.intro
x y a : ℤ
ha : x = a + a
b : ℤ
hb : y = b + b
⊢ ∃ r, x ^ 2 + y ^ 2 = r + r |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | equiv_if_evens | [37, 1] | [47, 10] | rw [ha, hb] | case intro.intro
x y a : ℤ
ha : x = a + a
b : ℤ
hb : y = b + b
⊢ ∃ r, x ^ 2 + y ^ 2 = r + r | case intro.intro
x y a : ℤ
ha : x = a + a
b : ℤ
hb : y = b + b
⊢ ∃ r, (a + a) ^ 2 + (b + b) ^ 2 = r + r |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | equiv_if_evens | [37, 1] | [47, 10] | use (2 * a ^ 2 + 2 * b ^ 2) | case intro.intro
x y a : ℤ
ha : x = a + a
b : ℤ
hb : y = b + b
⊢ ∃ r, (a + a) ^ 2 + (b + b) ^ 2 = r + r | case h
x y a : ℤ
ha : x = a + a
b : ℤ
hb : y = b + b
⊢ (a + a) ^ 2 + (b + b) ^ 2 = 2 * a ^ 2 + 2 * b ^ 2 + (2 * a ^ 2 + 2 * b ^ 2) |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | equiv_if_evens | [37, 1] | [47, 10] | ring_nf | case h
x y a : ℤ
ha : x = a + a
b : ℤ
hb : y = b + b
⊢ (a + a) ^ 2 + (b + b) ^ 2 = 2 * a ^ 2 + 2 * b ^ 2 + (2 * a ^ 2 + 2 * b ^ 2) | no goals |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | equiv_if_odds | [49, 1] | [60, 10] | intros ex ey | x y : ℤ
⊢ Odd x → Odd y → equiv_rel x y | x y : ℤ
ex : Odd x
ey : Odd y
⊢ equiv_rel x y |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | equiv_if_odds | [49, 1] | [60, 10] | simp [equiv_rel, Odd, Even] at * | x y : ℤ
ex : Odd x
ey : Odd y
⊢ equiv_rel x y | x y : ℤ
ex : ∃ k, x = 2 * k + 1
ey : ∃ k, y = 2 * k + 1
⊢ ∃ r, x ^ 2 + y ^ 2 = r + r |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | equiv_if_odds | [49, 1] | [60, 10] | rcases ex with ⟨a, ha⟩ | x y : ℤ
ex : ∃ k, x = 2 * k + 1
ey : ∃ k, y = 2 * k + 1
⊢ ∃ r, x ^ 2 + y ^ 2 = r + r | case intro
x y : ℤ
ey : ∃ k, y = 2 * k + 1
a : ℤ
ha : x = 2 * a + 1
⊢ ∃ r, x ^ 2 + y ^ 2 = r + r |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | equiv_if_odds | [49, 1] | [60, 10] | rcases ey with ⟨b, hb⟩ | case intro
x y : ℤ
ey : ∃ k, y = 2 * k + 1
a : ℤ
ha : x = 2 * a + 1
⊢ ∃ r, x ^ 2 + y ^ 2 = r + r | case intro.intro
x y a : ℤ
ha : x = 2 * a + 1
b : ℤ
hb : y = 2 * b + 1
⊢ ∃ r, x ^ 2 + y ^ 2 = r + r |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | equiv_if_odds | [49, 1] | [60, 10] | rw [ha, hb] | case intro.intro
x y a : ℤ
ha : x = 2 * a + 1
b : ℤ
hb : y = 2 * b + 1
⊢ ∃ r, x ^ 2 + y ^ 2 = r + r | case intro.intro
x y a : ℤ
ha : x = 2 * a + 1
b : ℤ
hb : y = 2 * b + 1
⊢ ∃ r, (2 * a + 1) ^ 2 + (2 * b + 1) ^ 2 = r + r |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | equiv_if_odds | [49, 1] | [60, 10] | ring_nf | case intro.intro
x y a : ℤ
ha : x = 2 * a + 1
b : ℤ
hb : y = 2 * b + 1
⊢ ∃ r, (2 * a + 1) ^ 2 + (2 * b + 1) ^ 2 = r + r | case intro.intro
x y a : ℤ
ha : x = 2 * a + 1
b : ℤ
hb : y = 2 * b + 1
⊢ ∃ r, 2 + a * 4 + a ^ 2 * 4 + b * 4 + b ^ 2 * 4 = r * 2 |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | equiv_if_odds | [49, 1] | [60, 10] | use (1 + 2 * a + 2 * a ^ 2 + 2 * b + 2 * b ^ 2) | case intro.intro
x y a : ℤ
ha : x = 2 * a + 1
b : ℤ
hb : y = 2 * b + 1
⊢ ∃ r, 2 + a * 4 + a ^ 2 * 4 + b * 4 + b ^ 2 * 4 = r * 2 | case h
x y a : ℤ
ha : x = 2 * a + 1
b : ℤ
hb : y = 2 * b + 1
⊢ 2 + a * 4 + a ^ 2 * 4 + b * 4 + b ^ 2 * 4 = (1 + 2 * a + 2 * a ^ 2 + 2 * b + 2 * b ^ 2) * 2 |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | equiv_if_odds | [49, 1] | [60, 10] | ring_nf | case h
x y a : ℤ
ha : x = 2 * a + 1
b : ℤ
hb : y = 2 * b + 1
⊢ 2 + a * 4 + a ^ 2 * 4 + b * 4 + b ^ 2 * 4 = (1 + 2 * a + 2 * a ^ 2 + 2 * b + 2 * b ^ 2) * 2 | no goals |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | nequiv_if_diff_parity | [62, 1] | [81, 50] | intros ex ey equiv | x y : ℤ
⊢ Odd x → Even y → ¬equiv_rel x y | x y : ℤ
ex : Odd x
ey : Even y
equiv : equiv_rel x y
⊢ False |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | nequiv_if_diff_parity | [62, 1] | [81, 50] | simp [equiv_rel, Odd, Even] at * | x y : ℤ
ex : Odd x
ey : Even y
equiv : equiv_rel x y
⊢ False | x y : ℤ
ex : ∃ k, x = 2 * k + 1
ey : ∃ r, y = r + r
equiv : ∃ r, x ^ 2 + y ^ 2 = r + r
⊢ False |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | nequiv_if_diff_parity | [62, 1] | [81, 50] | rcases ex with ⟨a, ha⟩ | x y : ℤ
ex : ∃ k, x = 2 * k + 1
ey : ∃ r, y = r + r
equiv : ∃ r, x ^ 2 + y ^ 2 = r + r
⊢ False | case intro
x y : ℤ
ey : ∃ r, y = r + r
equiv : ∃ r, x ^ 2 + y ^ 2 = r + r
a : ℤ
ha : x = 2 * a + 1
⊢ False |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | nequiv_if_diff_parity | [62, 1] | [81, 50] | rcases ey with ⟨b, hb⟩ | case intro
x y : ℤ
ey : ∃ r, y = r + r
equiv : ∃ r, x ^ 2 + y ^ 2 = r + r
a : ℤ
ha : x = 2 * a + 1
⊢ False | case intro.intro
x y : ℤ
equiv : ∃ r, x ^ 2 + y ^ 2 = r + r
a : ℤ
ha : x = 2 * a + 1
b : ℤ
hb : y = b + b
⊢ False |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | nequiv_if_diff_parity | [62, 1] | [81, 50] | rcases equiv with ⟨e, he⟩ | case intro.intro
x y : ℤ
equiv : ∃ r, x ^ 2 + y ^ 2 = r + r
a : ℤ
ha : x = 2 * a + 1
b : ℤ
hb : y = b + b
⊢ False | case intro.intro.intro
x y a : ℤ
ha : x = 2 * a + 1
b : ℤ
hb : y = b + b
e : ℤ
he : x ^ 2 + y ^ 2 = e + e
⊢ False |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | nequiv_if_diff_parity | [62, 1] | [81, 50] | rw [ha, hb] at he | case intro.intro.intro
x y a : ℤ
ha : x = 2 * a + 1
b : ℤ
hb : y = b + b
e : ℤ
he : x ^ 2 + y ^ 2 = e + e
⊢ False | case intro.intro.intro
x y a : ℤ
ha : x = 2 * a + 1
b : ℤ
hb : y = b + b
e : ℤ
he : (2 * a + 1) ^ 2 + (b + b) ^ 2 = e + e
⊢ False |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | nequiv_if_diff_parity | [62, 1] | [81, 50] | ring_nf at he | case intro.intro.intro
x y a : ℤ
ha : x = 2 * a + 1
b : ℤ
hb : y = b + b
e : ℤ
he : (2 * a + 1) ^ 2 + (b + b) ^ 2 = e + e
⊢ False | case intro.intro.intro
x y a : ℤ
ha : x = 2 * a + 1
b : ℤ
hb : y = b + b
e : ℤ
he : 1 + a * 4 + a ^ 2 * 4 + b ^ 2 * 4 = e * 2
⊢ False |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | nequiv_if_diff_parity | [62, 1] | [81, 50] | symm at he | case intro.intro.intro
x y a : ℤ
ha : x = 2 * a + 1
b : ℤ
hb : y = b + b
e : ℤ
he : 1 + a * 4 + a ^ 2 * 4 + b ^ 2 * 4 = e * 2
⊢ False | case intro.intro.intro
x y a : ℤ
ha : x = 2 * a + 1
b : ℤ
hb : y = b + b
e : ℤ
he : e * 2 = 1 + a * 4 + a ^ 2 * 4 + b ^ 2 * 4
⊢ False |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | nequiv_if_diff_parity | [62, 1] | [81, 50] | rw [mul_comm] at he | case intro.intro.intro
x y a : ℤ
ha : x = 2 * a + 1
b : ℤ
hb : y = b + b
e : ℤ
he : e * 2 = 1 + a * 4 + a ^ 2 * 4 + b ^ 2 * 4
⊢ False | case intro.intro.intro
x y a : ℤ
ha : x = 2 * a + 1
b : ℤ
hb : y = b + b
e : ℤ
he : 2 * e = 1 + a * 4 + a ^ 2 * 4 + b ^ 2 * 4
⊢ False |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | nequiv_if_diff_parity | [62, 1] | [81, 50] | have two_dvd := dvd_of_mul_right_eq e he | case intro.intro.intro
x y a : ℤ
ha : x = 2 * a + 1
b : ℤ
hb : y = b + b
e : ℤ
he : 2 * e = 1 + a * 4 + a ^ 2 * 4 + b ^ 2 * 4
⊢ False | case intro.intro.intro
x y a : ℤ
ha : x = 2 * a + 1
b : ℤ
hb : y = b + b
e : ℤ
he : 2 * e = 1 + a * 4 + a ^ 2 * 4 + b ^ 2 * 4
two_dvd : 2 ∣ 1 + a * 4 + a ^ 2 * 4 + b ^ 2 * 4
⊢ False |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | nequiv_if_diff_parity | [62, 1] | [81, 50] | have hring :
1 + a * 4 + a ^ 2 * 4 + b ^ 2 * 4
= 2 * (2 * a + 2 * a ^ 2 + 2 * b ^ 2) + 1 := by
ring_nf | case intro.intro.intro
x y a : ℤ
ha : x = 2 * a + 1
b : ℤ
hb : y = b + b
e : ℤ
he : 2 * e = 1 + a * 4 + a ^ 2 * 4 + b ^ 2 * 4
two_dvd : 2 ∣ 1 + a * 4 + a ^ 2 * 4 + b ^ 2 * 4
⊢ False | case intro.intro.intro
x y a : ℤ
ha : x = 2 * a + 1
b : ℤ
hb : y = b + b
e : ℤ
he : 2 * e = 1 + a * 4 + a ^ 2 * 4 + b ^ 2 * 4
two_dvd : 2 ∣ 1 + a * 4 + a ^ 2 * 4 + b ^ 2 * 4
hring : 1 + a * 4 + a ^ 2 * 4 + b ^ 2 * 4 = 2 * (2 * a + 2 * a ^ 2 + 2 * b ^ 2) + 1
⊢ False |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | nequiv_if_diff_parity | [62, 1] | [81, 50] | rw [hring] at two_dvd | case intro.intro.intro
x y a : ℤ
ha : x = 2 * a + 1
b : ℤ
hb : y = b + b
e : ℤ
he : 2 * e = 1 + a * 4 + a ^ 2 * 4 + b ^ 2 * 4
two_dvd : 2 ∣ 1 + a * 4 + a ^ 2 * 4 + b ^ 2 * 4
hring : 1 + a * 4 + a ^ 2 * 4 + b ^ 2 * 4 = 2 * (2 * a + 2 * a ^ 2 + 2 * b ^ 2) + 1
⊢ False | case intro.intro.intro
x y a : ℤ
ha : x = 2 * a + 1
b : ℤ
hb : y = b + b
e : ℤ
he : 2 * e = 1 + a * 4 + a ^ 2 * 4 + b ^ 2 * 4
two_dvd : 2 ∣ 2 * (2 * a + 2 * a ^ 2 + 2 * b ^ 2) + 1
hring : 1 + a * 4 + a ^ 2 * 4 + b ^ 2 * 4 = 2 * (2 * a + 2 * a ^ 2 + 2 * b ^ 2) + 1
⊢ False |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | nequiv_if_diff_parity | [62, 1] | [81, 50] | exact Int.two_not_dvd_two_mul_add_one _ two_dvd | case intro.intro.intro
x y a : ℤ
ha : x = 2 * a + 1
b : ℤ
hb : y = b + b
e : ℤ
he : 2 * e = 1 + a * 4 + a ^ 2 * 4 + b ^ 2 * 4
two_dvd : 2 ∣ 2 * (2 * a + 2 * a ^ 2 + 2 * b ^ 2) + 1
hring : 1 + a * 4 + a ^ 2 * 4 + b ^ 2 * 4 = 2 * (2 * a + 2 * a ^ 2 + 2 * b ^ 2) + 1
⊢ False | no goals |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | nequiv_if_diff_parity | [62, 1] | [81, 50] | ring_nf | x y a : ℤ
ha : x = 2 * a + 1
b : ℤ
hb : y = b + b
e : ℤ
he : 2 * e = 1 + a * 4 + a ^ 2 * 4 + b ^ 2 * 4
two_dvd : 2 ∣ 1 + a * 4 + a ^ 2 * 4 + b ^ 2 * 4
⊢ 1 + a * 4 + a ^ 2 * 4 + b ^ 2 * 4 = 2 * (2 * a + 2 * a ^ 2 + 2 * b ^ 2) + 1 | no goals |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | nequiv_if_diff_parity' | [83, 1] | [89, 39] | intros ex ey equiv | x y : ℤ
⊢ Even x → Odd y → ¬equiv_rel x y | x y : ℤ
ex : Even x
ey : Odd y
equiv : equiv_rel x y
⊢ False |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | nequiv_if_diff_parity' | [83, 1] | [89, 39] | have nequiv := nequiv_if_diff_parity ey ex | x y : ℤ
ex : Even x
ey : Odd y
equiv : equiv_rel x y
⊢ False | x y : ℤ
ex : Even x
ey : Odd y
equiv : equiv_rel x y
nequiv : ¬equiv_rel y x
⊢ False |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | nequiv_if_diff_parity' | [83, 1] | [89, 39] | exact nequiv (equiv_inst.symm equiv) | x y : ℤ
ex : Even x
ey : Odd y
equiv : equiv_rel x y
nequiv : ¬equiv_rel y x
⊢ False | no goals |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | lin_rel_is_not_function | [101, 1] | [117, 13] | intro is_fn | ⊢ ¬is_function lin_rel | is_fn : is_function lin_rel
⊢ False |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | lin_rel_is_not_function | [101, 1] | [117, 13] | rw [is_function] at is_fn | is_fn : is_function lin_rel
⊢ False | is_fn : lin_rel ⊆ Set.univ ×ˢ Set.univ ∧ ∀ (x : ℤ), ∃! y, (x, y) ∈ lin_rel
⊢ False |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | lin_rel_is_not_function | [101, 1] | [117, 13] | rw [lin_rel, Set.subset_def] at is_fn | is_fn : lin_rel ⊆ Set.univ ×ˢ Set.univ ∧ ∀ (x : ℤ), ∃! y, (x, y) ∈ lin_rel
⊢ False | is_fn : (∀ x ∈ {p | p.1 + 3 * p.2 = 4}, x ∈ Set.univ ×ˢ Set.univ) ∧ ∀ (x : ℤ), ∃! y, (x, y) ∈ {p | p.1 + 3 * p.2 = 4}
⊢ False |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | lin_rel_is_not_function | [101, 1] | [117, 13] | rcases is_fn with ⟨rel_sub, rel_uniq⟩ | is_fn : (∀ x ∈ {p | p.1 + 3 * p.2 = 4}, x ∈ Set.univ ×ˢ Set.univ) ∧ ∀ (x : ℤ), ∃! y, (x, y) ∈ {p | p.1 + 3 * p.2 = 4}
⊢ False | case intro
rel_sub : ∀ x ∈ {p | p.1 + 3 * p.2 = 4}, x ∈ Set.univ ×ˢ Set.univ
rel_uniq : ∀ (x : ℤ), ∃! y, (x, y) ∈ {p | p.1 + 3 * p.2 = 4}
⊢ False |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | lin_rel_is_not_function | [101, 1] | [117, 13] | simp at * | case intro
rel_sub : ∀ x ∈ {p | p.1 + 3 * p.2 = 4}, x ∈ Set.univ ×ˢ Set.univ
rel_uniq : ∀ (x : ℤ), ∃! y, (x, y) ∈ {p | p.1 + 3 * p.2 = 4}
⊢ False | case intro
rel_uniq : ∀ (x : ℤ), ∃! y, x + 3 * y = 4
rel_sub : True
⊢ False |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | lin_rel_is_not_function | [101, 1] | [117, 13] | specialize rel_uniq 3 | case intro
rel_uniq : ∀ (x : ℤ), ∃! y, x + 3 * y = 4
rel_sub : True
⊢ False | case intro
rel_sub : True
rel_uniq : ∃! y, 3 + 3 * y = 4
⊢ False |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | lin_rel_is_not_function | [101, 1] | [117, 13] | rw [ExistsUnique] at rel_uniq | case intro
rel_sub : True
rel_uniq : ∃! y, 3 + 3 * y = 4
⊢ False | case intro
rel_sub : True
rel_uniq : ∃ x, 3 + 3 * x = 4 ∧ ∀ (y : ℤ), 3 + 3 * y = 4 → y = x
⊢ False |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | lin_rel_is_not_function | [101, 1] | [117, 13] | rcases rel_uniq with ⟨y, ⟨hl, _⟩⟩ | case intro
rel_sub : True
rel_uniq : ∃ x, 3 + 3 * x = 4 ∧ ∀ (y : ℤ), 3 + 3 * y = 4 → y = x
⊢ False | case intro.intro.intro
rel_sub : True
y : ℤ
hl : 3 + 3 * y = 4
right✝ : ∀ (y_1 : ℤ), 3 + 3 * y_1 = 4 → y_1 = y
⊢ False |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | lin_rel_is_not_function | [101, 1] | [117, 13] | apply_fun (λ e => e - 3) at hl | case intro.intro.intro
rel_sub : True
y : ℤ
hl : 3 + 3 * y = 4
right✝ : ∀ (y_1 : ℤ), 3 + 3 * y_1 = 4 → y_1 = y
⊢ False | case intro.intro.intro
rel_sub : True
y : ℤ
right✝ : ∀ (y_1 : ℤ), 3 + 3 * y_1 = 4 → y_1 = y
hl : 3 + 3 * y - 3 = 4 - 3
⊢ False |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | lin_rel_is_not_function | [101, 1] | [117, 13] | ring_nf at hl | case intro.intro.intro
rel_sub : True
y : ℤ
right✝ : ∀ (y_1 : ℤ), 3 + 3 * y_1 = 4 → y_1 = y
hl : 3 + 3 * y - 3 = 4 - 3
⊢ False | case intro.intro.intro
rel_sub : True
y : ℤ
right✝ : ∀ (y_1 : ℤ), 3 + 3 * y_1 = 4 → y_1 = y
hl : y * 3 = 1
⊢ False |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | lin_rel_is_not_function | [101, 1] | [117, 13] | rw [Int.mul_eq_one_iff_eq_one_or_neg_one] at hl | case intro.intro.intro
rel_sub : True
y : ℤ
right✝ : ∀ (y_1 : ℤ), 3 + 3 * y_1 = 4 → y_1 = y
hl : y * 3 = 1
⊢ False | case intro.intro.intro
rel_sub : True
y : ℤ
right✝ : ∀ (y_1 : ℤ), 3 + 3 * y_1 = 4 → y_1 = y
hl : y = 1 ∧ 3 = 1 ∨ y = -1 ∧ 3 = -1
⊢ False |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | lin_rel_is_not_function | [101, 1] | [117, 13] | rcases hl with (hl | hr) | case intro.intro.intro
rel_sub : True
y : ℤ
right✝ : ∀ (y_1 : ℤ), 3 + 3 * y_1 = 4 → y_1 = y
hl : y = 1 ∧ 3 = 1 ∨ y = -1 ∧ 3 = -1
⊢ False | case intro.intro.intro.inl
rel_sub : True
y : ℤ
right✝ : ∀ (y_1 : ℤ), 3 + 3 * y_1 = 4 → y_1 = y
hl : y = 1 ∧ 3 = 1
⊢ False
case intro.intro.intro.inr
rel_sub : True
y : ℤ
right✝ : ∀ (y_1 : ℤ), 3 + 3 * y_1 = 4 → y_1 = y
hr : y = -1 ∧ 3 = -1
⊢ False |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | lin_rel_is_not_function | [101, 1] | [117, 13] | linarith | case intro.intro.intro.inl
rel_sub : True
y : ℤ
right✝ : ∀ (y_1 : ℤ), 3 + 3 * y_1 = 4 → y_1 = y
hl : y = 1 ∧ 3 = 1
⊢ False | no goals |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | lin_rel_is_not_function | [101, 1] | [117, 13] | linarith | case intro.intro.intro.inr
rel_sub : True
y : ℤ
right✝ : ∀ (y_1 : ℤ), 3 + 3 * y_1 = 4 → y_1 = y
hr : y = -1 ∧ 3 = -1
⊢ False | no goals |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | sq_rel_is_not_function | [122, 1] | [136, 11] | intro is_fn | ⊢ ¬is_function sq_rel | is_fn : is_function sq_rel
⊢ False |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | sq_rel_is_not_function | [122, 1] | [136, 11] | rw [is_function] at is_fn | is_fn : is_function sq_rel
⊢ False | is_fn : sq_rel ⊆ Set.univ ×ˢ Set.univ ∧ ∀ (x : ℝ), ∃! y, (x, y) ∈ sq_rel
⊢ False |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | sq_rel_is_not_function | [122, 1] | [136, 11] | rw [sq_rel, Set.subset_def] at is_fn | is_fn : sq_rel ⊆ Set.univ ×ˢ Set.univ ∧ ∀ (x : ℝ), ∃! y, (x, y) ∈ sq_rel
⊢ False | is_fn :
(∀ x ∈ {x | ∃ x_1, (x_1 ^ 2, x_1) = x}, x ∈ Set.univ ×ˢ Set.univ) ∧
∀ (x : ℝ), ∃! y, (x, y) ∈ {x | ∃ x_1, (x_1 ^ 2, x_1) = x}
⊢ False |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | sq_rel_is_not_function | [122, 1] | [136, 11] | rcases is_fn with ⟨rel_sub, rel_uniq⟩ | is_fn :
(∀ x ∈ {x | ∃ x_1, (x_1 ^ 2, x_1) = x}, x ∈ Set.univ ×ˢ Set.univ) ∧
∀ (x : ℝ), ∃! y, (x, y) ∈ {x | ∃ x_1, (x_1 ^ 2, x_1) = x}
⊢ False | case intro
rel_sub : ∀ x ∈ {x | ∃ x_1, (x_1 ^ 2, x_1) = x}, x ∈ Set.univ ×ˢ Set.univ
rel_uniq : ∀ (x : ℝ), ∃! y, (x, y) ∈ {x | ∃ x_1, (x_1 ^ 2, x_1) = x}
⊢ False |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | sq_rel_is_not_function | [122, 1] | [136, 11] | simp at * | case intro
rel_sub : ∀ x ∈ {x | ∃ x_1, (x_1 ^ 2, x_1) = x}, x ∈ Set.univ ×ˢ Set.univ
rel_uniq : ∀ (x : ℝ), ∃! y, (x, y) ∈ {x | ∃ x_1, (x_1 ^ 2, x_1) = x}
⊢ False | case intro
rel_sub : True
rel_uniq : ∀ (x : ℝ), ∃! y, y ^ 2 = x
⊢ False |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | sq_rel_is_not_function | [122, 1] | [136, 11] | specialize rel_uniq 4 | case intro
rel_sub : True
rel_uniq : ∀ (x : ℝ), ∃! y, y ^ 2 = x
⊢ False | case intro
rel_sub : True
rel_uniq : ∃! y, y ^ 2 = 4
⊢ False |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | sq_rel_is_not_function | [122, 1] | [136, 11] | rw [ExistsUnique] at rel_uniq | case intro
rel_sub : True
rel_uniq : ∃! y, y ^ 2 = 4
⊢ False | case intro
rel_sub : True
rel_uniq : ∃ x, x ^ 2 = 4 ∧ ∀ (y : ℝ), y ^ 2 = 4 → y = x
⊢ False |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | sq_rel_is_not_function | [122, 1] | [136, 11] | rcases rel_uniq with ⟨y, ⟨_, hrel⟩⟩ | case intro
rel_sub : True
rel_uniq : ∃ x, x ^ 2 = 4 ∧ ∀ (y : ℝ), y ^ 2 = 4 → y = x
⊢ False | case intro.intro.intro
rel_sub : True
y : ℝ
left✝ : y ^ 2 = 4
hrel : ∀ (y_1 : ℝ), y_1 ^ 2 = 4 → y_1 = y
⊢ False |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | sq_rel_is_not_function | [122, 1] | [136, 11] | have htwo := hrel (2) (by ring_nf) | case intro.intro.intro
rel_sub : True
y : ℝ
left✝ : y ^ 2 = 4
hrel : ∀ (y_1 : ℝ), y_1 ^ 2 = 4 → y_1 = y
⊢ False | case intro.intro.intro
rel_sub : True
y : ℝ
left✝ : y ^ 2 = 4
hrel : ∀ (y_1 : ℝ), y_1 ^ 2 = 4 → y_1 = y
htwo : 2 = y
⊢ False |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | sq_rel_is_not_function | [122, 1] | [136, 11] | have hmtwo := hrel (-2) (by ring_nf) | case intro.intro.intro
rel_sub : True
y : ℝ
left✝ : y ^ 2 = 4
hrel : ∀ (y_1 : ℝ), y_1 ^ 2 = 4 → y_1 = y
htwo : 2 = y
⊢ False | case intro.intro.intro
rel_sub : True
y : ℝ
left✝ : y ^ 2 = 4
hrel : ∀ (y_1 : ℝ), y_1 ^ 2 = 4 → y_1 = y
htwo : 2 = y
hmtwo : -2 = y
⊢ False |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | sq_rel_is_not_function | [122, 1] | [136, 11] | rw [←htwo] at hmtwo | case intro.intro.intro
rel_sub : True
y : ℝ
left✝ : y ^ 2 = 4
hrel : ∀ (y_1 : ℝ), y_1 ^ 2 = 4 → y_1 = y
htwo : 2 = y
hmtwo : -2 = y
⊢ False | case intro.intro.intro
rel_sub : True
y : ℝ
left✝ : y ^ 2 = 4
hrel : ∀ (y_1 : ℝ), y_1 ^ 2 = 4 → y_1 = y
htwo : 2 = y
hmtwo : -2 = 2
⊢ False |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | sq_rel_is_not_function | [122, 1] | [136, 11] | linarith | case intro.intro.intro
rel_sub : True
y : ℝ
left✝ : y ^ 2 = 4
hrel : ∀ (y_1 : ℝ), y_1 ^ 2 = 4 → y_1 = y
htwo : 2 = y
hmtwo : -2 = 2
⊢ False | no goals |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | sq_rel_is_not_function | [122, 1] | [136, 11] | ring_nf | rel_sub : True
y : ℝ
left✝ : y ^ 2 = 4
hrel : ∀ (y_1 : ℝ), y_1 ^ 2 = 4 → y_1 = y
⊢ 2 ^ 2 = 4 | no goals |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | sq_rel_is_not_function | [122, 1] | [136, 11] | ring_nf | rel_sub : True
y : ℝ
left✝ : y ^ 2 = 4
hrel : ∀ (y_1 : ℝ), y_1 ^ 2 = 4 → y_1 = y
htwo : 2 = y
⊢ (-2) ^ 2 = 4 | no goals |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | pair_fn_injective | [141, 1] | [154, 17] | intros p q eq | ⊢ Function.Injective pair_fn | p q : ℤ × ℤ
eq : pair_fn p = pair_fn q
⊢ p = q |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | pair_fn_injective | [141, 1] | [154, 17] | simp [pair_fn] at eq | p q : ℤ × ℤ
eq : pair_fn p = pair_fn q
⊢ p = q | p q : ℤ × ℤ
eq : p.1 + p.2 = q.1 + q.2 ∧ 2 * p.1 + p.2 = 2 * q.1 + q.2
⊢ p = q |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | pair_fn_injective | [141, 1] | [154, 17] | rcases eq with ⟨hl, hr⟩ | p q : ℤ × ℤ
eq : p.1 + p.2 = q.1 + q.2 ∧ 2 * p.1 + p.2 = 2 * q.1 + q.2
⊢ p = q | case intro
p q : ℤ × ℤ
hl : p.1 + p.2 = q.1 + q.2
hr : 2 * p.1 + p.2 = 2 * q.1 + q.2
⊢ p = q |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | pair_fn_injective | [141, 1] | [154, 17] | rw [Prod.eq_iff_fst_eq_snd_eq] | case intro
p q : ℤ × ℤ
hl : p.1 + p.2 = q.1 + q.2
hr : 2 * p.1 + p.2 = 2 * q.1 + q.2
⊢ p = q | case intro
p q : ℤ × ℤ
hl : p.1 + p.2 = q.1 + q.2
hr : 2 * p.1 + p.2 = 2 * q.1 + q.2
⊢ p.1 = q.1 ∧ p.2 = q.2 |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | pair_fn_injective | [141, 1] | [154, 17] | apply_fun (λ e => e - (p.1 + p.2)) at hr | case intro
p q : ℤ × ℤ
hl : p.1 + p.2 = q.1 + q.2
hr : 2 * p.1 + p.2 = 2 * q.1 + q.2
⊢ p.1 = q.1 ∧ p.2 = q.2 | case intro
p q : ℤ × ℤ
hl : p.1 + p.2 = q.1 + q.2
hr : 2 * p.1 + p.2 - (p.1 + p.2) = 2 * q.1 + q.2 - (p.1 + p.2)
⊢ p.1 = q.1 ∧ p.2 = q.2 |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | pair_fn_injective | [141, 1] | [154, 17] | nth_rewrite 2 [hl] at hr | case intro
p q : ℤ × ℤ
hl : p.1 + p.2 = q.1 + q.2
hr : 2 * p.1 + p.2 - (p.1 + p.2) = 2 * q.1 + q.2 - (p.1 + p.2)
⊢ p.1 = q.1 ∧ p.2 = q.2 | case intro
p q : ℤ × ℤ
hl : p.1 + p.2 = q.1 + q.2
hr : 2 * p.1 + p.2 - (p.1 + p.2) = 2 * q.1 + q.2 - (q.1 + q.2)
⊢ p.1 = q.1 ∧ p.2 = q.2 |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | pair_fn_injective | [141, 1] | [154, 17] | ring_nf at hr | case intro
p q : ℤ × ℤ
hl : p.1 + p.2 = q.1 + q.2
hr : 2 * p.1 + p.2 - (p.1 + p.2) = 2 * q.1 + q.2 - (q.1 + q.2)
⊢ p.1 = q.1 ∧ p.2 = q.2 | case intro
p q : ℤ × ℤ
hl : p.1 + p.2 = q.1 + q.2
hr : p.1 = q.1
⊢ p.1 = q.1 ∧ p.2 = q.2 |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | pair_fn_injective | [141, 1] | [154, 17] | rw [hr] at hl | case intro
p q : ℤ × ℤ
hl : p.1 + p.2 = q.1 + q.2
hr : p.1 = q.1
⊢ p.1 = q.1 ∧ p.2 = q.2 | case intro
p q : ℤ × ℤ
hl : q.1 + p.2 = q.1 + q.2
hr : p.1 = q.1
⊢ p.1 = q.1 ∧ p.2 = q.2 |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | pair_fn_injective | [141, 1] | [154, 17] | apply_fun (λ e => e - q.1) at hl | case intro
p q : ℤ × ℤ
hl : q.1 + p.2 = q.1 + q.2
hr : p.1 = q.1
⊢ p.1 = q.1 ∧ p.2 = q.2 | case intro
p q : ℤ × ℤ
hr : p.1 = q.1
hl : q.1 + p.2 - q.1 = q.1 + q.2 - q.1
⊢ p.1 = q.1 ∧ p.2 = q.2 |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | pair_fn_injective | [141, 1] | [154, 17] | ring_nf at hl | case intro
p q : ℤ × ℤ
hr : p.1 = q.1
hl : q.1 + p.2 - q.1 = q.1 + q.2 - q.1
⊢ p.1 = q.1 ∧ p.2 = q.2 | case intro
p q : ℤ × ℤ
hr : p.1 = q.1
hl : p.2 = q.2
⊢ p.1 = q.1 ∧ p.2 = q.2 |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | pair_fn_injective | [141, 1] | [154, 17] | exact ⟨hr, hl⟩ | case intro
p q : ℤ × ℤ
hr : p.1 = q.1
hl : p.2 = q.2
⊢ p.1 = q.1 ∧ p.2 = q.2 | no goals |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | pair_fn_surjective | [156, 1] | [165, 10] | intro p | ⊢ Function.Surjective pair_fn | p : ℤ × ℤ
⊢ ∃ a, pair_fn a = p |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | pair_fn_surjective | [156, 1] | [165, 10] | simp [pair_fn] | p : ℤ × ℤ
⊢ ∃ a, pair_fn a = p | p : ℤ × ℤ
⊢ ∃ a b, (a + b, 2 * a + b) = p |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | pair_fn_surjective | [156, 1] | [165, 10] | use (-p.1 + p.2) | p : ℤ × ℤ
⊢ ∃ a b, (a + b, 2 * a + b) = p | case h
p : ℤ × ℤ
⊢ ∃ b, (-p.1 + p.2 + b, 2 * (-p.1 + p.2) + b) = p |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | pair_fn_surjective | [156, 1] | [165, 10] | use (2 * p.1 - p.2) | case h
p : ℤ × ℤ
⊢ ∃ b, (-p.1 + p.2 + b, 2 * (-p.1 + p.2) + b) = p | case h
p : ℤ × ℤ
⊢ (-p.1 + p.2 + (2 * p.1 - p.2), 2 * (-p.1 + p.2) + (2 * p.1 - p.2)) = p |
https://github.com/aronerben/lean4-playground.git | 5efced915ecee24cd723d28d00aa63f9c7ea0a9c | meetings/ex4.lean | pair_fn_surjective | [156, 1] | [165, 10] | ring_nf | case h
p : ℤ × ℤ
⊢ (-p.1 + p.2 + (2 * p.1 - p.2), 2 * (-p.1 + p.2) + (2 * p.1 - p.2)) = p | no goals |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.