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/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.reverseAux_spec
[476, 1]
[483, 41]
simp [reverse, reverseAux]
case nil α : Type u_1 acc : List α ⊢ reverseAux [] acc = reverse [] ++ acc
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.reverseAux_spec
[476, 1]
[483, 41]
simp only [reverse, reverseAux]
case cons α : Type u_1 x : α xs : List α ih : ∀ (acc : List α), reverseAux xs acc = reverse xs ++ acc acc : List α ⊢ reverseAux (x :: xs) acc = reverse (x :: xs) ++ acc
case cons α : Type u_1 x : α xs : List α ih : ∀ (acc : List α), reverseAux xs acc = reverse xs ++ acc acc : List α ⊢ reverseAux xs (x :: acc) = reverseAux xs [x] ++ acc
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.reverseAux_spec
[476, 1]
[483, 41]
simp only [ih]
case cons α : Type u_1 x : α xs : List α ih : ∀ (acc : List α), reverseAux xs acc = reverse xs ++ acc acc : List α ⊢ reverseAux xs (x :: acc) = reverseAux xs [x] ++ acc
case cons α : Type u_1 x : α xs : List α ih : ∀ (acc : List α), reverseAux xs acc = reverse xs ++ acc acc : List α ⊢ reverse xs ++ x :: acc = reverse xs ++ [x] ++ acc
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.reverseAux_spec
[476, 1]
[483, 41]
rw [←singleton_append, append_assoc]
case cons α : Type u_1 x : α xs : List α ih : ∀ (acc : List α), reverseAux xs acc = reverse xs ++ acc acc : List α ⊢ reverse xs ++ x :: acc = reverse xs ++ [x] ++ acc
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.reverse_eq_reverseSpec
[489, 1]
[496, 33]
simp [reverse, reverseAux, reverseSpec]
case nil α : Type u_1 ⊢ reverse [] = reverseSpec []
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.reverse_eq_reverseSpec
[489, 1]
[496, 33]
simp only [reverse, reverseSpec, reverseAux]
case cons α : Type u_1 x : α xs : List α ih : reverse xs = reverseSpec xs ⊢ reverse (x :: xs) = reverseSpec (x :: xs)
case cons α : Type u_1 x : α xs : List α ih : reverse xs = reverseSpec xs ⊢ reverseAux xs [x] = reverseSpec xs ++ [x]
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.reverse_eq_reverseSpec
[489, 1]
[496, 33]
rw [reverseAux_spec]
case cons α : Type u_1 x : α xs : List α ih : reverse xs = reverseSpec xs ⊢ reverseAux xs [x] = reverseSpec xs ++ [x]
case cons α : Type u_1 x : α xs : List α ih : reverse xs = reverseSpec xs ⊢ reverse xs ++ [x] = reverseSpec xs ++ [x]
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.removeAll_singleton_hd_neq
[501, 1]
[505, 59]
intros x y xs hneq
α : Type u_1 inst✝ : BEq α ⊢ ∀ (x y : α) (xs : List α), (x == y) = false → removeAll (x :: xs) [y] = x :: removeAll xs [y]
α : Type u_1 inst✝ : BEq α x y : α xs : List α hneq : (x == y) = false ⊢ removeAll (x :: xs) [y] = x :: removeAll xs [y]
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.removeAll_singleton_hd_neq
[501, 1]
[505, 59]
simp only [removeAll, filter, notElem, elem, hneq, not]
α : Type u_1 inst✝ : BEq α x y : α xs : List α hneq : (x == y) = false ⊢ removeAll (x :: xs) [y] = x :: removeAll xs [y]
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.removeAll_singleton_hd_eq
[507, 1]
[510, 43]
intros x xs
α : Type u_1 inst✝ : DecidableEq α ⊢ ∀ (x : α) (xs : List α), removeAll (x :: xs) [x] = removeAll xs [x]
α : Type u_1 inst✝ : DecidableEq α x : α xs : List α ⊢ removeAll (x :: xs) [x] = removeAll xs [x]
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.removeAll_singleton_hd_eq
[507, 1]
[510, 43]
simp [removeAll, filter, notElem, elem]
α : Type u_1 inst✝ : DecidableEq α x : α xs : List α ⊢ removeAll (x :: xs) [x] = removeAll xs [x]
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.mem_singleton_iff
[512, 1]
[520, 16]
apply Iff.intro
α : Type u_1 x y : α ⊢ x ∈ [y] ↔ x = y
case mp α : Type u_1 x y : α ⊢ x ∈ [y] → x = y case mpr α : Type u_1 x y : α ⊢ x = y → x ∈ [y]
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.mem_singleton_iff
[512, 1]
[520, 16]
. intro hmem cases hmem . rfl . contradiction
case mp α : Type u_1 x y : α ⊢ x ∈ [y] → x = y case mpr α : Type u_1 x y : α ⊢ x = y → x ∈ [y]
case mpr α : Type u_1 x y : α ⊢ x = y → x ∈ [y]
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.mem_singleton_iff
[512, 1]
[520, 16]
. intro heq rw [heq] constructor
case mpr α : Type u_1 x y : α ⊢ x = y → x ∈ [y]
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.mem_singleton_iff
[512, 1]
[520, 16]
intro hmem
case mp α : Type u_1 x y : α ⊢ x ∈ [y] → x = y
case mp α : Type u_1 x y : α hmem : x ∈ [y] ⊢ x = y
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.mem_singleton_iff
[512, 1]
[520, 16]
cases hmem
case mp α : Type u_1 x y : α hmem : x ∈ [y] ⊢ x = y
case mp.head α : Type u_1 x : α ⊢ x = x case mp.tail α : Type u_1 x y : α a✝ : Mem x [] ⊢ x = y
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.mem_singleton_iff
[512, 1]
[520, 16]
. rfl
case mp.head α : Type u_1 x : α ⊢ x = x case mp.tail α : Type u_1 x y : α a✝ : Mem x [] ⊢ x = y
case mp.tail α : Type u_1 x y : α a✝ : Mem x [] ⊢ x = y
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.mem_singleton_iff
[512, 1]
[520, 16]
. contradiction
case mp.tail α : Type u_1 x y : α a✝ : Mem x [] ⊢ x = y
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.mem_singleton_iff
[512, 1]
[520, 16]
rfl
case mp.head α : Type u_1 x : α ⊢ x = x
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.mem_singleton_iff
[512, 1]
[520, 16]
contradiction
case mp.tail α : Type u_1 x y : α a✝ : Mem x [] ⊢ x = y
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.mem_singleton_iff
[512, 1]
[520, 16]
intro heq
case mpr α : Type u_1 x y : α ⊢ x = y → x ∈ [y]
case mpr α : Type u_1 x y : α heq : x = y ⊢ x ∈ [y]
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.mem_singleton_iff
[512, 1]
[520, 16]
rw [heq]
case mpr α : Type u_1 x y : α heq : x = y ⊢ x ∈ [y]
case mpr α : Type u_1 x y : α heq : x = y ⊢ y ∈ [y]
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.mem_singleton_iff
[512, 1]
[520, 16]
constructor
case mpr α : Type u_1 x y : α heq : x = y ⊢ y ∈ [y]
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.removeAllEq_singleton_hd_eq
[524, 1]
[529, 37]
intros x xs
α : Type u_1 inst✝ : DecidableEq α ⊢ ∀ (x : α) (xs : List α), removeAllEq (x :: xs) [x] = removeAllEq xs [x]
α : Type u_1 inst✝ : DecidableEq α x : α xs : List α ⊢ removeAllEq (x :: xs) [x] = removeAllEq xs [x]
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.removeAllEq_singleton_hd_eq
[524, 1]
[529, 37]
simp [removeAllEq, filter, notElem, elem]
α : Type u_1 inst✝ : DecidableEq α x : α xs : List α ⊢ removeAllEq (x :: xs) [x] = removeAllEq xs [x]
α : Type u_1 inst✝ : DecidableEq α x : α xs : List α ⊢ (match !decide (x ∈ [x]) with | true => x :: filter (fun x_1 => !decide (x_1 ∈ [x])) xs | false => filter (fun x_1 => !decide (x_1 ∈ [x])) xs) = filter (fun x_1 => !decide (x_1 ∈ [x])) xs
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.removeAllEq_singleton_hd_eq
[524, 1]
[529, 37]
have hmem : x ∈ [x] := by constructor
α : Type u_1 inst✝ : DecidableEq α x : α xs : List α ⊢ (match !decide (x ∈ [x]) with | true => x :: filter (fun x_1 => !decide (x_1 ∈ [x])) xs | false => filter (fun x_1 => !decide (x_1 ∈ [x])) xs) = filter (fun x_1 => !decide (x_1 ∈ [x])) xs
α : Type u_1 inst✝ : DecidableEq α x : α xs : List α hmem : x ∈ [x] ⊢ (match !decide (x ∈ [x]) with | true => x :: filter (fun x_1 => !decide (x_1 ∈ [x])) xs | false => filter (fun x_1 => !decide (x_1 ∈ [x])) xs) = filter (fun x_1 => !decide (x_1 ∈ [x])) xs
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.removeAllEq_singleton_hd_eq
[524, 1]
[529, 37]
simp only [hmem, decide_true, not]
α : Type u_1 inst✝ : DecidableEq α x : α xs : List α hmem : x ∈ [x] ⊢ (match !decide (x ∈ [x]) with | true => x :: filter (fun x_1 => !decide (x_1 ∈ [x])) xs | false => filter (fun x_1 => !decide (x_1 ∈ [x])) xs) = filter (fun x_1 => !decide (x_1 ∈ [x])) xs
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.removeAllEq_singleton_hd_eq
[524, 1]
[529, 37]
constructor
α : Type u_1 inst✝ : DecidableEq α x : α xs : List α ⊢ x ∈ [x]
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.removeAllEq_singleton_hd_neq
[531, 1]
[541, 51]
intro x y xs hneq
α : Type u_1 inst✝ : DecidableEq α ⊢ ∀ (x y : α) (xs : List α), x ≠ y → removeAllEq (x :: xs) [y] = x :: removeAllEq xs [y]
α : Type u_1 inst✝ : DecidableEq α x y : α xs : List α hneq : x ≠ y ⊢ removeAllEq (x :: xs) [y] = x :: removeAllEq xs [y]
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.removeAllEq_singleton_hd_neq
[531, 1]
[541, 51]
simp only [removeAllEq, filter, notElem, elem, hneq, not]
α : Type u_1 inst✝ : DecidableEq α x y : α xs : List α hneq : x ≠ y ⊢ removeAllEq (x :: xs) [y] = x :: removeAllEq xs [y]
α : Type u_1 inst✝ : DecidableEq α x y : α xs : List α hneq : x ≠ y ⊢ (match decide ¬x ∈ [y] with | true => x :: filter (fun x => decide ¬x ∈ [y]) xs | false => filter (fun x => decide ¬x ∈ [y]) xs) = x :: filter (fun x => decide ¬x ∈ [y]) xs
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.removeAllEq_singleton_hd_neq
[531, 1]
[541, 51]
cases Decidable.em (x ∈ [y]) with | inl hmem => rw [mem_singleton_iff] at hmem contradiction | inr hnmem => simp [hnmem, decide_true, not_false_eq_true]
α : Type u_1 inst✝ : DecidableEq α x y : α xs : List α hneq : x ≠ y ⊢ (match decide ¬x ∈ [y] with | true => x :: filter (fun x => decide ¬x ∈ [y]) xs | false => filter (fun x => decide ¬x ∈ [y]) xs) = x :: filter (fun x => decide ¬x ∈ [y]) xs
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.removeAllEq_singleton_hd_neq
[531, 1]
[541, 51]
rw [mem_singleton_iff] at hmem
case inl α : Type u_1 inst✝ : DecidableEq α x y : α xs : List α hneq : x ≠ y hmem : x ∈ [y] ⊢ (match decide ¬x ∈ [y] with | true => x :: filter (fun x => decide ¬x ∈ [y]) xs | false => filter (fun x => decide ¬x ∈ [y]) xs) = x :: filter (fun x => decide ¬x ∈ [y]) xs
case inl α : Type u_1 inst✝ : DecidableEq α x y : α xs : List α hneq : x ≠ y hmem : x = y ⊢ (match decide ¬x ∈ [y] with | true => x :: filter (fun x => decide ¬x ∈ [y]) xs | false => filter (fun x => decide ¬x ∈ [y]) xs) = x :: filter (fun x => decide ¬x ∈ [y]) xs
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.removeAllEq_singleton_hd_neq
[531, 1]
[541, 51]
contradiction
case inl α : Type u_1 inst✝ : DecidableEq α x y : α xs : List α hneq : x ≠ y hmem : x = y ⊢ (match decide ¬x ∈ [y] with | true => x :: filter (fun x => decide ¬x ∈ [y]) xs | false => filter (fun x => decide ¬x ∈ [y]) xs) = x :: filter (fun x => decide ¬x ∈ [y]) xs
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.removeAllEq_singleton_hd_neq
[531, 1]
[541, 51]
simp [hnmem, decide_true, not_false_eq_true]
case inr α : Type u_1 inst✝ : DecidableEq α x y : α xs : List α hneq : x ≠ y hnmem : ¬x ∈ [y] ⊢ (match decide ¬x ∈ [y] with | true => x :: filter (fun x => decide ¬x ∈ [y]) xs | false => filter (fun x => decide ¬x ∈ [y]) xs) = x :: filter (fun x => decide ¬x ∈ [y]) xs
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.sieve_removeAllEq
[543, 1]
[560, 16]
cases h
α : Type u_1 b : Bool bs : List Bool h : length (b :: bs) = length [] ⊢ length (sieve (b :: bs) []) = length (removeAllEq (b :: bs) [false])
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.sieve_removeAllEq
[543, 1]
[560, 16]
cases h
α : Type u_1 x : α xs : List α h : length [] = length (x :: xs) ⊢ length (sieve [] (x :: xs)) = length (removeAllEq [] [false])
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.sieve_removeAllEq
[543, 1]
[560, 16]
rw [removeAllEq_singleton_hd_neq]
α : Type u_1 bs : List Bool x : α xs : List α h : length (true :: bs) = length (x :: xs) ih : length (sieve bs xs) = length (removeAllEq bs [false]) ⊢ length (sieve (true :: bs) (x :: xs)) = length (removeAllEq (true :: bs) [false])
α : Type u_1 bs : List Bool x : α xs : List α h : length (true :: bs) = length (x :: xs) ih : length (sieve bs xs) = length (removeAllEq bs [false]) ⊢ length (sieve (true :: bs) (x :: xs)) = length (true :: removeAllEq bs [false]) case a α : Type u_1 bs : List Bool x : α xs : List α h : length (true :: bs) = length (x :: xs) ih : length (sieve bs xs) = length (removeAllEq bs [false]) ⊢ true ≠ false
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.sieve_removeAllEq
[543, 1]
[560, 16]
. simp only [length] apply congrArg (λ x => x + 1) exact ih
α : Type u_1 bs : List Bool x : α xs : List α h : length (true :: bs) = length (x :: xs) ih : length (sieve bs xs) = length (removeAllEq bs [false]) ⊢ length (sieve (true :: bs) (x :: xs)) = length (true :: removeAllEq bs [false]) case a α : Type u_1 bs : List Bool x : α xs : List α h : length (true :: bs) = length (x :: xs) ih : length (sieve bs xs) = length (removeAllEq bs [false]) ⊢ true ≠ false
case a α : Type u_1 bs : List Bool x : α xs : List α h : length (true :: bs) = length (x :: xs) ih : length (sieve bs xs) = length (removeAllEq bs [false]) ⊢ true ≠ false
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.sieve_removeAllEq
[543, 1]
[560, 16]
. apply Bool.noConfusion
case a α : Type u_1 bs : List Bool x : α xs : List α h : length (true :: bs) = length (x :: xs) ih : length (sieve bs xs) = length (removeAllEq bs [false]) ⊢ true ≠ false
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.sieve_removeAllEq
[543, 1]
[560, 16]
simp only [length]
α : Type u_1 bs : List Bool x : α xs : List α h : length (true :: bs) = length (x :: xs) ih : length (sieve bs xs) = length (removeAllEq bs [false]) ⊢ length (sieve (true :: bs) (x :: xs)) = length (true :: removeAllEq bs [false])
α : Type u_1 bs : List Bool x : α xs : List α h : length (true :: bs) = length (x :: xs) ih : length (sieve bs xs) = length (removeAllEq bs [false]) ⊢ length (sieve bs xs) + 1 = length (removeAllEq bs [false]) + 1
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.sieve_removeAllEq
[543, 1]
[560, 16]
apply congrArg (λ x => x + 1)
α : Type u_1 bs : List Bool x : α xs : List α h : length (true :: bs) = length (x :: xs) ih : length (sieve bs xs) = length (removeAllEq bs [false]) ⊢ length (sieve bs xs) + 1 = length (removeAllEq bs [false]) + 1
α : Type u_1 bs : List Bool x : α xs : List α h : length (true :: bs) = length (x :: xs) ih : length (sieve bs xs) = length (removeAllEq bs [false]) ⊢ length (sieve bs xs) = length (removeAllEq bs [false])
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.sieve_removeAllEq
[543, 1]
[560, 16]
exact ih
α : Type u_1 bs : List Bool x : α xs : List α h : length (true :: bs) = length (x :: xs) ih : length (sieve bs xs) = length (removeAllEq bs [false]) ⊢ length (sieve bs xs) = length (removeAllEq bs [false])
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.sieve_removeAllEq
[543, 1]
[560, 16]
apply Bool.noConfusion
case a α : Type u_1 bs : List Bool x : α xs : List α h : length (true :: bs) = length (x :: xs) ih : length (sieve bs xs) = length (removeAllEq bs [false]) ⊢ true ≠ false
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.sieve_removeAllEq
[543, 1]
[560, 16]
rw [removeAllEq_singleton_hd_eq]
α : Type u_1 bs : List Bool x : α xs : List α h : length (false :: bs) = length (x :: xs) ih : length (sieve bs xs) = length (removeAllEq bs [false]) ⊢ length (sieve (false :: bs) (x :: xs)) = length (removeAllEq (false :: bs) [false])
α : Type u_1 bs : List Bool x : α xs : List α h : length (false :: bs) = length (x :: xs) ih : length (sieve bs xs) = length (removeAllEq bs [false]) ⊢ length (sieve (false :: bs) (x :: xs)) = length (removeAllEq bs [false])
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.sieve_removeAllEq
[543, 1]
[560, 16]
. simp only [length, sieve] exact ih
α : Type u_1 bs : List Bool x : α xs : List α h : length (false :: bs) = length (x :: xs) ih : length (sieve bs xs) = length (removeAllEq bs [false]) ⊢ length (sieve (false :: bs) (x :: xs)) = length (removeAllEq bs [false])
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.sieve_removeAllEq
[543, 1]
[560, 16]
simp only [length, sieve]
α : Type u_1 bs : List Bool x : α xs : List α h : length (false :: bs) = length (x :: xs) ih : length (sieve bs xs) = length (removeAllEq bs [false]) ⊢ length (sieve (false :: bs) (x :: xs)) = length (removeAllEq bs [false])
α : Type u_1 bs : List Bool x : α xs : List α h : length (false :: bs) = length (x :: xs) ih : length (sieve bs xs) = length (removeAllEq bs [false]) ⊢ length (sieve bs xs) = length (removeAllEq bs [false])
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.sieve_removeAllEq
[543, 1]
[560, 16]
exact ih
α : Type u_1 bs : List Bool x : α xs : List α h : length (false :: bs) = length (x :: xs) ih : length (sieve bs xs) = length (removeAllEq bs [false]) ⊢ length (sieve bs xs) = length (removeAllEq bs [false])
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.removeAllEq_singleton_nonelem_eq
[562, 1]
[578, 21]
intro xs x hnmem
α : Type u_1 inst✝ : DecidableEq α ⊢ ∀ (xs : List α) (x : α), ¬x ∈ xs → removeAllEq xs [x] = xs
α : Type u_1 inst✝ : DecidableEq α xs : List α x : α hnmem : ¬x ∈ xs ⊢ removeAllEq xs [x] = xs
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.removeAllEq_singleton_nonelem_eq
[562, 1]
[578, 21]
induction xs with | nil => rfl | cons x' xs ih => rw [removeAllEq_singleton_hd_neq] congr apply ih intro hneg apply hnmem apply Mem.tail . exact hneg . intro hneg' rw [hneg'] at hnmem apply hnmem apply Mem.head
α : Type u_1 inst✝ : DecidableEq α xs : List α x : α hnmem : ¬x ∈ xs ⊢ removeAllEq xs [x] = xs
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.removeAllEq_singleton_nonelem_eq
[562, 1]
[578, 21]
rfl
case nil α : Type u_1 inst✝ : DecidableEq α x : α hnmem : ¬x ∈ [] ⊢ removeAllEq [] [x] = []
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.removeAllEq_singleton_nonelem_eq
[562, 1]
[578, 21]
rw [removeAllEq_singleton_hd_neq]
case cons α : Type u_1 inst✝ : DecidableEq α x x' : α xs : List α ih : ¬x ∈ xs → removeAllEq xs [x] = xs hnmem : ¬x ∈ x' :: xs ⊢ removeAllEq (x' :: xs) [x] = x' :: xs
case cons α : Type u_1 inst✝ : DecidableEq α x x' : α xs : List α ih : ¬x ∈ xs → removeAllEq xs [x] = xs hnmem : ¬x ∈ x' :: xs ⊢ x' :: removeAllEq xs [x] = x' :: xs case cons.a α : Type u_1 inst✝ : DecidableEq α x x' : α xs : List α ih : ¬x ∈ xs → removeAllEq xs [x] = xs hnmem : ¬x ∈ x' :: xs ⊢ x' ≠ x
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.removeAllEq_singleton_nonelem_eq
[562, 1]
[578, 21]
congr
case cons α : Type u_1 inst✝ : DecidableEq α x x' : α xs : List α ih : ¬x ∈ xs → removeAllEq xs [x] = xs hnmem : ¬x ∈ x' :: xs ⊢ x' :: removeAllEq xs [x] = x' :: xs case cons.a α : Type u_1 inst✝ : DecidableEq α x x' : α xs : List α ih : ¬x ∈ xs → removeAllEq xs [x] = xs hnmem : ¬x ∈ x' :: xs ⊢ x' ≠ x
case cons.e_tail α : Type u_1 inst✝ : DecidableEq α x x' : α xs : List α ih : ¬x ∈ xs → removeAllEq xs [x] = xs hnmem : ¬x ∈ x' :: xs ⊢ removeAllEq xs [x] = xs case cons.a α : Type u_1 inst✝ : DecidableEq α x x' : α xs : List α ih : ¬x ∈ xs → removeAllEq xs [x] = xs hnmem : ¬x ∈ x' :: xs ⊢ x' ≠ x
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.removeAllEq_singleton_nonelem_eq
[562, 1]
[578, 21]
apply ih
case cons.e_tail α : Type u_1 inst✝ : DecidableEq α x x' : α xs : List α ih : ¬x ∈ xs → removeAllEq xs [x] = xs hnmem : ¬x ∈ x' :: xs ⊢ removeAllEq xs [x] = xs case cons.a α : Type u_1 inst✝ : DecidableEq α x x' : α xs : List α ih : ¬x ∈ xs → removeAllEq xs [x] = xs hnmem : ¬x ∈ x' :: xs ⊢ x' ≠ x
case cons.e_tail α : Type u_1 inst✝ : DecidableEq α x x' : α xs : List α ih : ¬x ∈ xs → removeAllEq xs [x] = xs hnmem : ¬x ∈ x' :: xs ⊢ ¬x ∈ xs case cons.a α : Type u_1 inst✝ : DecidableEq α x x' : α xs : List α ih : ¬x ∈ xs → removeAllEq xs [x] = xs hnmem : ¬x ∈ x' :: xs ⊢ x' ≠ x
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.removeAllEq_singleton_nonelem_eq
[562, 1]
[578, 21]
intro hneg
case cons.e_tail α : Type u_1 inst✝ : DecidableEq α x x' : α xs : List α ih : ¬x ∈ xs → removeAllEq xs [x] = xs hnmem : ¬x ∈ x' :: xs ⊢ ¬x ∈ xs case cons.a α : Type u_1 inst✝ : DecidableEq α x x' : α xs : List α ih : ¬x ∈ xs → removeAllEq xs [x] = xs hnmem : ¬x ∈ x' :: xs ⊢ x' ≠ x
case cons.e_tail α : Type u_1 inst✝ : DecidableEq α x x' : α xs : List α ih : ¬x ∈ xs → removeAllEq xs [x] = xs hnmem : ¬x ∈ x' :: xs hneg : x ∈ xs ⊢ False case cons.a α : Type u_1 inst✝ : DecidableEq α x x' : α xs : List α ih : ¬x ∈ xs → removeAllEq xs [x] = xs hnmem : ¬x ∈ x' :: xs ⊢ x' ≠ x
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.removeAllEq_singleton_nonelem_eq
[562, 1]
[578, 21]
apply hnmem
case cons.e_tail α : Type u_1 inst✝ : DecidableEq α x x' : α xs : List α ih : ¬x ∈ xs → removeAllEq xs [x] = xs hnmem : ¬x ∈ x' :: xs hneg : x ∈ xs ⊢ False case cons.a α : Type u_1 inst✝ : DecidableEq α x x' : α xs : List α ih : ¬x ∈ xs → removeAllEq xs [x] = xs hnmem : ¬x ∈ x' :: xs ⊢ x' ≠ x
case cons.e_tail α : Type u_1 inst✝ : DecidableEq α x x' : α xs : List α ih : ¬x ∈ xs → removeAllEq xs [x] = xs hnmem : ¬x ∈ x' :: xs hneg : x ∈ xs ⊢ x ∈ x' :: xs case cons.a α : Type u_1 inst✝ : DecidableEq α x x' : α xs : List α ih : ¬x ∈ xs → removeAllEq xs [x] = xs hnmem : ¬x ∈ x' :: xs ⊢ x' ≠ x
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.removeAllEq_singleton_nonelem_eq
[562, 1]
[578, 21]
apply Mem.tail
case cons.e_tail α : Type u_1 inst✝ : DecidableEq α x x' : α xs : List α ih : ¬x ∈ xs → removeAllEq xs [x] = xs hnmem : ¬x ∈ x' :: xs hneg : x ∈ xs ⊢ x ∈ x' :: xs case cons.a α : Type u_1 inst✝ : DecidableEq α x x' : α xs : List α ih : ¬x ∈ xs → removeAllEq xs [x] = xs hnmem : ¬x ∈ x' :: xs ⊢ x' ≠ x
case cons.e_tail.a α : Type u_1 inst✝ : DecidableEq α x x' : α xs : List α ih : ¬x ∈ xs → removeAllEq xs [x] = xs hnmem : ¬x ∈ x' :: xs hneg : x ∈ xs ⊢ Mem x xs case cons.a α : Type u_1 inst✝ : DecidableEq α x x' : α xs : List α ih : ¬x ∈ xs → removeAllEq xs [x] = xs hnmem : ¬x ∈ x' :: xs ⊢ x' ≠ x
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.removeAllEq_singleton_nonelem_eq
[562, 1]
[578, 21]
. exact hneg
case cons.e_tail.a α : Type u_1 inst✝ : DecidableEq α x x' : α xs : List α ih : ¬x ∈ xs → removeAllEq xs [x] = xs hnmem : ¬x ∈ x' :: xs hneg : x ∈ xs ⊢ Mem x xs case cons.a α : Type u_1 inst✝ : DecidableEq α x x' : α xs : List α ih : ¬x ∈ xs → removeAllEq xs [x] = xs hnmem : ¬x ∈ x' :: xs ⊢ x' ≠ x
case cons.a α : Type u_1 inst✝ : DecidableEq α x x' : α xs : List α ih : ¬x ∈ xs → removeAllEq xs [x] = xs hnmem : ¬x ∈ x' :: xs ⊢ x' ≠ x
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.removeAllEq_singleton_nonelem_eq
[562, 1]
[578, 21]
. intro hneg' rw [hneg'] at hnmem apply hnmem apply Mem.head
case cons.a α : Type u_1 inst✝ : DecidableEq α x x' : α xs : List α ih : ¬x ∈ xs → removeAllEq xs [x] = xs hnmem : ¬x ∈ x' :: xs ⊢ x' ≠ x
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.removeAllEq_singleton_nonelem_eq
[562, 1]
[578, 21]
exact hneg
case cons.e_tail.a α : Type u_1 inst✝ : DecidableEq α x x' : α xs : List α ih : ¬x ∈ xs → removeAllEq xs [x] = xs hnmem : ¬x ∈ x' :: xs hneg : x ∈ xs ⊢ Mem x xs
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.removeAllEq_singleton_nonelem_eq
[562, 1]
[578, 21]
intro hneg'
case cons.a α : Type u_1 inst✝ : DecidableEq α x x' : α xs : List α ih : ¬x ∈ xs → removeAllEq xs [x] = xs hnmem : ¬x ∈ x' :: xs ⊢ x' ≠ x
case cons.a α : Type u_1 inst✝ : DecidableEq α x x' : α xs : List α ih : ¬x ∈ xs → removeAllEq xs [x] = xs hnmem : ¬x ∈ x' :: xs hneg' : x' = x ⊢ False
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.removeAllEq_singleton_nonelem_eq
[562, 1]
[578, 21]
rw [hneg'] at hnmem
case cons.a α : Type u_1 inst✝ : DecidableEq α x x' : α xs : List α ih : ¬x ∈ xs → removeAllEq xs [x] = xs hnmem : ¬x ∈ x' :: xs hneg' : x' = x ⊢ False
case cons.a α : Type u_1 inst✝ : DecidableEq α x x' : α xs : List α ih : ¬x ∈ xs → removeAllEq xs [x] = xs hnmem : ¬x ∈ x :: xs hneg' : x' = x ⊢ False
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.removeAllEq_singleton_nonelem_eq
[562, 1]
[578, 21]
apply hnmem
case cons.a α : Type u_1 inst✝ : DecidableEq α x x' : α xs : List α ih : ¬x ∈ xs → removeAllEq xs [x] = xs hnmem : ¬x ∈ x :: xs hneg' : x' = x ⊢ False
case cons.a α : Type u_1 inst✝ : DecidableEq α x x' : α xs : List α ih : ¬x ∈ xs → removeAllEq xs [x] = xs hnmem : ¬x ∈ x :: xs hneg' : x' = x ⊢ x ∈ x :: xs
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.removeAllEq_singleton_nonelem_eq
[562, 1]
[578, 21]
apply Mem.head
case cons.a α : Type u_1 inst✝ : DecidableEq α x x' : α xs : List α ih : ¬x ∈ xs → removeAllEq xs [x] = xs hnmem : ¬x ∈ x :: xs hneg' : x' = x ⊢ x ∈ x :: xs
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.length_mergeWith
[580, 1]
[613, 63]
simp only [mergeWith, length, Nat.zero_add]
α : Type u_1 cmp : α → α → Ordering ys : List α ⊢ length (mergeWith cmp ([], ys)) = length [] + length ys
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.length_mergeWith
[580, 1]
[613, 63]
simp only [mergeWith]
α : Type u_1 cmp : α → α → Ordering x : α xs : List α y : α ys : List α ih₁ : length (mergeWith cmp (y :: ys, xs)) = length (y :: ys) + length xs ih₂ : length (mergeWith cmp (ys, x :: xs)) = length ys + length (x :: xs) ⊢ length (mergeWith cmp (x :: xs, y :: ys)) = length (x :: xs) + length (y :: ys)
α : Type u_1 cmp : α → α → Ordering x : α xs : List α y : α ys : List α ih₁ : length (mergeWith cmp (y :: ys, xs)) = length (y :: ys) + length xs ih₂ : length (mergeWith cmp (ys, x :: xs)) = length ys + length (x :: xs) ⊢ length (match cmp x y with | Ordering.gt => y :: mergeWith cmp (ys, x :: xs) | x_1 => x :: mergeWith cmp (y :: ys, xs)) = length (x :: xs) + length (y :: ys)
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.length_mergeWith
[580, 1]
[613, 63]
cases cmp x y with | lt => simp only have h₁ : length (x :: mergeWith cmp (y :: ys, xs)) = length (mergeWith cmp (y :: ys, xs)) + 1 := rfl have h₂ : length (x :: xs) = length xs + 1 := rfl rw [h₁, h₂, Nat.add_comm (length xs + 1), ←Nat.add_assoc] apply congrArg (λ x => x + 1) exact ih₁ | eq => simp only have h₁ : length (x :: mergeWith cmp (y :: ys, xs)) = length (mergeWith cmp (y :: ys, xs)) + 1 := rfl have h₂ : length (x :: xs) = length xs + 1 := rfl rw [h₁, h₂, Nat.add_comm (length xs + 1), ←Nat.add_assoc] apply congrArg (λ x => x + 1) exact ih₁ | gt => simp only [length] simp only [length] at ih₂ rw [←Nat.add_assoc] apply congrArg (λ x => x + 1) rw [Nat.add_comm] exact ih₂
α : Type u_1 cmp : α → α → Ordering x : α xs : List α y : α ys : List α ih₁ : length (mergeWith cmp (y :: ys, xs)) = length (y :: ys) + length xs ih₂ : length (mergeWith cmp (ys, x :: xs)) = length ys + length (x :: xs) ⊢ length (match cmp x y with | Ordering.gt => y :: mergeWith cmp (ys, x :: xs) | x_1 => x :: mergeWith cmp (y :: ys, xs)) = length (x :: xs) + length (y :: ys)
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.length_mergeWith
[580, 1]
[613, 63]
simp only
case lt α : Type u_1 cmp : α → α → Ordering x : α xs : List α y : α ys : List α ih₁ : length (mergeWith cmp (y :: ys, xs)) = length (y :: ys) + length xs ih₂ : length (mergeWith cmp (ys, x :: xs)) = length ys + length (x :: xs) ⊢ length (match Ordering.lt with | Ordering.gt => y :: mergeWith cmp (ys, x :: xs) | x_1 => x :: mergeWith cmp (y :: ys, xs)) = length (x :: xs) + length (y :: ys)
case lt α : Type u_1 cmp : α → α → Ordering x : α xs : List α y : α ys : List α ih₁ : length (mergeWith cmp (y :: ys, xs)) = length (y :: ys) + length xs ih₂ : length (mergeWith cmp (ys, x :: xs)) = length ys + length (x :: xs) ⊢ length (x :: mergeWith cmp (y :: ys, xs)) = length (x :: xs) + length (y :: ys)
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.length_mergeWith
[580, 1]
[613, 63]
have h₁ : length (x :: mergeWith cmp (y :: ys, xs)) = length (mergeWith cmp (y :: ys, xs)) + 1 := rfl
case lt α : Type u_1 cmp : α → α → Ordering x : α xs : List α y : α ys : List α ih₁ : length (mergeWith cmp (y :: ys, xs)) = length (y :: ys) + length xs ih₂ : length (mergeWith cmp (ys, x :: xs)) = length ys + length (x :: xs) ⊢ length (x :: mergeWith cmp (y :: ys, xs)) = length (x :: xs) + length (y :: ys)
case lt α : Type u_1 cmp : α → α → Ordering x : α xs : List α y : α ys : List α ih₁ : length (mergeWith cmp (y :: ys, xs)) = length (y :: ys) + length xs ih₂ : length (mergeWith cmp (ys, x :: xs)) = length ys + length (x :: xs) h₁ : length (x :: mergeWith cmp (y :: ys, xs)) = length (mergeWith cmp (y :: ys, xs)) + 1 ⊢ length (x :: mergeWith cmp (y :: ys, xs)) = length (x :: xs) + length (y :: ys)
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.length_mergeWith
[580, 1]
[613, 63]
have h₂ : length (x :: xs) = length xs + 1 := rfl
case lt α : Type u_1 cmp : α → α → Ordering x : α xs : List α y : α ys : List α ih₁ : length (mergeWith cmp (y :: ys, xs)) = length (y :: ys) + length xs ih₂ : length (mergeWith cmp (ys, x :: xs)) = length ys + length (x :: xs) h₁ : length (x :: mergeWith cmp (y :: ys, xs)) = length (mergeWith cmp (y :: ys, xs)) + 1 ⊢ length (x :: mergeWith cmp (y :: ys, xs)) = length (x :: xs) + length (y :: ys)
case lt α : Type u_1 cmp : α → α → Ordering x : α xs : List α y : α ys : List α ih₁ : length (mergeWith cmp (y :: ys, xs)) = length (y :: ys) + length xs ih₂ : length (mergeWith cmp (ys, x :: xs)) = length ys + length (x :: xs) h₁ : length (x :: mergeWith cmp (y :: ys, xs)) = length (mergeWith cmp (y :: ys, xs)) + 1 h₂ : length (x :: xs) = length xs + 1 ⊢ length (x :: mergeWith cmp (y :: ys, xs)) = length (x :: xs) + length (y :: ys)
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.length_mergeWith
[580, 1]
[613, 63]
rw [h₁, h₂, Nat.add_comm (length xs + 1), ←Nat.add_assoc]
case lt α : Type u_1 cmp : α → α → Ordering x : α xs : List α y : α ys : List α ih₁ : length (mergeWith cmp (y :: ys, xs)) = length (y :: ys) + length xs ih₂ : length (mergeWith cmp (ys, x :: xs)) = length ys + length (x :: xs) h₁ : length (x :: mergeWith cmp (y :: ys, xs)) = length (mergeWith cmp (y :: ys, xs)) + 1 h₂ : length (x :: xs) = length xs + 1 ⊢ length (x :: mergeWith cmp (y :: ys, xs)) = length (x :: xs) + length (y :: ys)
case lt α : Type u_1 cmp : α → α → Ordering x : α xs : List α y : α ys : List α ih₁ : length (mergeWith cmp (y :: ys, xs)) = length (y :: ys) + length xs ih₂ : length (mergeWith cmp (ys, x :: xs)) = length ys + length (x :: xs) h₁ : length (x :: mergeWith cmp (y :: ys, xs)) = length (mergeWith cmp (y :: ys, xs)) + 1 h₂ : length (x :: xs) = length xs + 1 ⊢ length (mergeWith cmp (y :: ys, xs)) + 1 = length (y :: ys) + length xs + 1
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.length_mergeWith
[580, 1]
[613, 63]
apply congrArg (λ x => x + 1)
case lt α : Type u_1 cmp : α → α → Ordering x : α xs : List α y : α ys : List α ih₁ : length (mergeWith cmp (y :: ys, xs)) = length (y :: ys) + length xs ih₂ : length (mergeWith cmp (ys, x :: xs)) = length ys + length (x :: xs) h₁ : length (x :: mergeWith cmp (y :: ys, xs)) = length (mergeWith cmp (y :: ys, xs)) + 1 h₂ : length (x :: xs) = length xs + 1 ⊢ length (mergeWith cmp (y :: ys, xs)) + 1 = length (y :: ys) + length xs + 1
case lt α : Type u_1 cmp : α → α → Ordering x : α xs : List α y : α ys : List α ih₁ : length (mergeWith cmp (y :: ys, xs)) = length (y :: ys) + length xs ih₂ : length (mergeWith cmp (ys, x :: xs)) = length ys + length (x :: xs) h₁ : length (x :: mergeWith cmp (y :: ys, xs)) = length (mergeWith cmp (y :: ys, xs)) + 1 h₂ : length (x :: xs) = length xs + 1 ⊢ length (mergeWith cmp (y :: ys, xs)) = length (y :: ys) + length xs
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.length_mergeWith
[580, 1]
[613, 63]
exact ih₁
case lt α : Type u_1 cmp : α → α → Ordering x : α xs : List α y : α ys : List α ih₁ : length (mergeWith cmp (y :: ys, xs)) = length (y :: ys) + length xs ih₂ : length (mergeWith cmp (ys, x :: xs)) = length ys + length (x :: xs) h₁ : length (x :: mergeWith cmp (y :: ys, xs)) = length (mergeWith cmp (y :: ys, xs)) + 1 h₂ : length (x :: xs) = length xs + 1 ⊢ length (mergeWith cmp (y :: ys, xs)) = length (y :: ys) + length xs
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.length_mergeWith
[580, 1]
[613, 63]
simp only
case eq α : Type u_1 cmp : α → α → Ordering x : α xs : List α y : α ys : List α ih₁ : length (mergeWith cmp (y :: ys, xs)) = length (y :: ys) + length xs ih₂ : length (mergeWith cmp (ys, x :: xs)) = length ys + length (x :: xs) ⊢ length (match Ordering.eq with | Ordering.gt => y :: mergeWith cmp (ys, x :: xs) | x_1 => x :: mergeWith cmp (y :: ys, xs)) = length (x :: xs) + length (y :: ys)
case eq α : Type u_1 cmp : α → α → Ordering x : α xs : List α y : α ys : List α ih₁ : length (mergeWith cmp (y :: ys, xs)) = length (y :: ys) + length xs ih₂ : length (mergeWith cmp (ys, x :: xs)) = length ys + length (x :: xs) ⊢ length (x :: mergeWith cmp (y :: ys, xs)) = length (x :: xs) + length (y :: ys)
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.length_mergeWith
[580, 1]
[613, 63]
have h₁ : length (x :: mergeWith cmp (y :: ys, xs)) = length (mergeWith cmp (y :: ys, xs)) + 1 := rfl
case eq α : Type u_1 cmp : α → α → Ordering x : α xs : List α y : α ys : List α ih₁ : length (mergeWith cmp (y :: ys, xs)) = length (y :: ys) + length xs ih₂ : length (mergeWith cmp (ys, x :: xs)) = length ys + length (x :: xs) ⊢ length (x :: mergeWith cmp (y :: ys, xs)) = length (x :: xs) + length (y :: ys)
case eq α : Type u_1 cmp : α → α → Ordering x : α xs : List α y : α ys : List α ih₁ : length (mergeWith cmp (y :: ys, xs)) = length (y :: ys) + length xs ih₂ : length (mergeWith cmp (ys, x :: xs)) = length ys + length (x :: xs) h₁ : length (x :: mergeWith cmp (y :: ys, xs)) = length (mergeWith cmp (y :: ys, xs)) + 1 ⊢ length (x :: mergeWith cmp (y :: ys, xs)) = length (x :: xs) + length (y :: ys)
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.length_mergeWith
[580, 1]
[613, 63]
have h₂ : length (x :: xs) = length xs + 1 := rfl
case eq α : Type u_1 cmp : α → α → Ordering x : α xs : List α y : α ys : List α ih₁ : length (mergeWith cmp (y :: ys, xs)) = length (y :: ys) + length xs ih₂ : length (mergeWith cmp (ys, x :: xs)) = length ys + length (x :: xs) h₁ : length (x :: mergeWith cmp (y :: ys, xs)) = length (mergeWith cmp (y :: ys, xs)) + 1 ⊢ length (x :: mergeWith cmp (y :: ys, xs)) = length (x :: xs) + length (y :: ys)
case eq α : Type u_1 cmp : α → α → Ordering x : α xs : List α y : α ys : List α ih₁ : length (mergeWith cmp (y :: ys, xs)) = length (y :: ys) + length xs ih₂ : length (mergeWith cmp (ys, x :: xs)) = length ys + length (x :: xs) h₁ : length (x :: mergeWith cmp (y :: ys, xs)) = length (mergeWith cmp (y :: ys, xs)) + 1 h₂ : length (x :: xs) = length xs + 1 ⊢ length (x :: mergeWith cmp (y :: ys, xs)) = length (x :: xs) + length (y :: ys)
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.length_mergeWith
[580, 1]
[613, 63]
rw [h₁, h₂, Nat.add_comm (length xs + 1), ←Nat.add_assoc]
case eq α : Type u_1 cmp : α → α → Ordering x : α xs : List α y : α ys : List α ih₁ : length (mergeWith cmp (y :: ys, xs)) = length (y :: ys) + length xs ih₂ : length (mergeWith cmp (ys, x :: xs)) = length ys + length (x :: xs) h₁ : length (x :: mergeWith cmp (y :: ys, xs)) = length (mergeWith cmp (y :: ys, xs)) + 1 h₂ : length (x :: xs) = length xs + 1 ⊢ length (x :: mergeWith cmp (y :: ys, xs)) = length (x :: xs) + length (y :: ys)
case eq α : Type u_1 cmp : α → α → Ordering x : α xs : List α y : α ys : List α ih₁ : length (mergeWith cmp (y :: ys, xs)) = length (y :: ys) + length xs ih₂ : length (mergeWith cmp (ys, x :: xs)) = length ys + length (x :: xs) h₁ : length (x :: mergeWith cmp (y :: ys, xs)) = length (mergeWith cmp (y :: ys, xs)) + 1 h₂ : length (x :: xs) = length xs + 1 ⊢ length (mergeWith cmp (y :: ys, xs)) + 1 = length (y :: ys) + length xs + 1
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.length_mergeWith
[580, 1]
[613, 63]
apply congrArg (λ x => x + 1)
case eq α : Type u_1 cmp : α → α → Ordering x : α xs : List α y : α ys : List α ih₁ : length (mergeWith cmp (y :: ys, xs)) = length (y :: ys) + length xs ih₂ : length (mergeWith cmp (ys, x :: xs)) = length ys + length (x :: xs) h₁ : length (x :: mergeWith cmp (y :: ys, xs)) = length (mergeWith cmp (y :: ys, xs)) + 1 h₂ : length (x :: xs) = length xs + 1 ⊢ length (mergeWith cmp (y :: ys, xs)) + 1 = length (y :: ys) + length xs + 1
case eq α : Type u_1 cmp : α → α → Ordering x : α xs : List α y : α ys : List α ih₁ : length (mergeWith cmp (y :: ys, xs)) = length (y :: ys) + length xs ih₂ : length (mergeWith cmp (ys, x :: xs)) = length ys + length (x :: xs) h₁ : length (x :: mergeWith cmp (y :: ys, xs)) = length (mergeWith cmp (y :: ys, xs)) + 1 h₂ : length (x :: xs) = length xs + 1 ⊢ length (mergeWith cmp (y :: ys, xs)) = length (y :: ys) + length xs
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.length_mergeWith
[580, 1]
[613, 63]
exact ih₁
case eq α : Type u_1 cmp : α → α → Ordering x : α xs : List α y : α ys : List α ih₁ : length (mergeWith cmp (y :: ys, xs)) = length (y :: ys) + length xs ih₂ : length (mergeWith cmp (ys, x :: xs)) = length ys + length (x :: xs) h₁ : length (x :: mergeWith cmp (y :: ys, xs)) = length (mergeWith cmp (y :: ys, xs)) + 1 h₂ : length (x :: xs) = length xs + 1 ⊢ length (mergeWith cmp (y :: ys, xs)) = length (y :: ys) + length xs
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.length_mergeWith
[580, 1]
[613, 63]
simp only [length]
case gt α : Type u_1 cmp : α → α → Ordering x : α xs : List α y : α ys : List α ih₁ : length (mergeWith cmp (y :: ys, xs)) = length (y :: ys) + length xs ih₂ : length (mergeWith cmp (ys, x :: xs)) = length ys + length (x :: xs) ⊢ length (match Ordering.gt with | Ordering.gt => y :: mergeWith cmp (ys, x :: xs) | x_1 => x :: mergeWith cmp (y :: ys, xs)) = length (x :: xs) + length (y :: ys)
case gt α : Type u_1 cmp : α → α → Ordering x : α xs : List α y : α ys : List α ih₁ : length (mergeWith cmp (y :: ys, xs)) = length (y :: ys) + length xs ih₂ : length (mergeWith cmp (ys, x :: xs)) = length ys + length (x :: xs) ⊢ length (mergeWith cmp (ys, x :: xs)) + 1 = length xs + 1 + (length ys + 1)
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.length_mergeWith
[580, 1]
[613, 63]
simp only [length] at ih₂
case gt α : Type u_1 cmp : α → α → Ordering x : α xs : List α y : α ys : List α ih₁ : length (mergeWith cmp (y :: ys, xs)) = length (y :: ys) + length xs ih₂ : length (mergeWith cmp (ys, x :: xs)) = length ys + length (x :: xs) ⊢ length (mergeWith cmp (ys, x :: xs)) + 1 = length xs + 1 + (length ys + 1)
case gt α : Type u_1 cmp : α → α → Ordering x : α xs : List α y : α ys : List α ih₁ : length (mergeWith cmp (y :: ys, xs)) = length (y :: ys) + length xs ih₂ : length (mergeWith cmp (ys, x :: xs)) = length ys + (length xs + 1) ⊢ length (mergeWith cmp (ys, x :: xs)) + 1 = length xs + 1 + (length ys + 1)
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.length_mergeWith
[580, 1]
[613, 63]
rw [←Nat.add_assoc]
case gt α : Type u_1 cmp : α → α → Ordering x : α xs : List α y : α ys : List α ih₁ : length (mergeWith cmp (y :: ys, xs)) = length (y :: ys) + length xs ih₂ : length (mergeWith cmp (ys, x :: xs)) = length ys + (length xs + 1) ⊢ length (mergeWith cmp (ys, x :: xs)) + 1 = length xs + 1 + (length ys + 1)
case gt α : Type u_1 cmp : α → α → Ordering x : α xs : List α y : α ys : List α ih₁ : length (mergeWith cmp (y :: ys, xs)) = length (y :: ys) + length xs ih₂ : length (mergeWith cmp (ys, x :: xs)) = length ys + (length xs + 1) ⊢ length (mergeWith cmp (ys, x :: xs)) + 1 = length xs + 1 + length ys + 1
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.length_mergeWith
[580, 1]
[613, 63]
apply congrArg (λ x => x + 1)
case gt α : Type u_1 cmp : α → α → Ordering x : α xs : List α y : α ys : List α ih₁ : length (mergeWith cmp (y :: ys, xs)) = length (y :: ys) + length xs ih₂ : length (mergeWith cmp (ys, x :: xs)) = length ys + (length xs + 1) ⊢ length (mergeWith cmp (ys, x :: xs)) + 1 = length xs + 1 + length ys + 1
case gt α : Type u_1 cmp : α → α → Ordering x : α xs : List α y : α ys : List α ih₁ : length (mergeWith cmp (y :: ys, xs)) = length (y :: ys) + length xs ih₂ : length (mergeWith cmp (ys, x :: xs)) = length ys + (length xs + 1) ⊢ length (mergeWith cmp (ys, x :: xs)) = length xs + 1 + length ys
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.length_mergeWith
[580, 1]
[613, 63]
rw [Nat.add_comm]
case gt α : Type u_1 cmp : α → α → Ordering x : α xs : List α y : α ys : List α ih₁ : length (mergeWith cmp (y :: ys, xs)) = length (y :: ys) + length xs ih₂ : length (mergeWith cmp (ys, x :: xs)) = length ys + (length xs + 1) ⊢ length (mergeWith cmp (ys, x :: xs)) = length xs + 1 + length ys
case gt α : Type u_1 cmp : α → α → Ordering x : α xs : List α y : α ys : List α ih₁ : length (mergeWith cmp (y :: ys, xs)) = length (y :: ys) + length xs ih₂ : length (mergeWith cmp (ys, x :: xs)) = length ys + (length xs + 1) ⊢ length (mergeWith cmp (ys, x :: xs)) = length ys + (length xs + 1)
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.length_mergeWith
[580, 1]
[613, 63]
exact ih₂
case gt α : Type u_1 cmp : α → α → Ordering x : α xs : List α y : α ys : List α ih₁ : length (mergeWith cmp (y :: ys, xs)) = length (y :: ys) + length xs ih₂ : length (mergeWith cmp (ys, x :: xs)) = length ys + (length xs + 1) ⊢ length (mergeWith cmp (ys, x :: xs)) = length ys + (length xs + 1)
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.length_split
[615, 1]
[628, 14]
simp only [split, length]
α : Type u_1 x y : α xs : List α ih : length (split xs).fst + length (split xs).snd = length xs ⊢ length (split (x :: y :: xs)).fst + length (split (x :: y :: xs)).snd = length (x :: y :: xs)
α : Type u_1 x y : α xs : List α ih : length (split xs).fst + length (split xs).snd = length xs ⊢ length (split xs).fst + 1 + (length (split xs).snd + 1) = length xs + 1 + 1
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.length_split
[615, 1]
[628, 14]
rw [Nat.add_assoc (length xs), Nat.add_assoc (length (split xs).1), Nat.add_comm 1, Nat.add_assoc (length (split xs).2), ←Nat.add_assoc (length (split xs).1)]
α : Type u_1 x y : α xs : List α ih : length (split xs).fst + length (split xs).snd = length xs ⊢ length (split xs).fst + 1 + (length (split xs).snd + 1) = length xs + 1 + 1
α : Type u_1 x y : α xs : List α ih : length (split xs).fst + length (split xs).snd = length xs ⊢ length (split xs).fst + length (split xs).snd + (1 + 1) = length xs + (1 + 1)
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.length_split
[615, 1]
[628, 14]
apply congrArg (λ x => x + (1 + 1))
α : Type u_1 x y : α xs : List α ih : length (split xs).fst + length (split xs).snd = length xs ⊢ length (split xs).fst + length (split xs).snd + (1 + 1) = length xs + (1 + 1)
α : Type u_1 x y : α xs : List α ih : length (split xs).fst + length (split xs).snd = length xs ⊢ length (split xs).fst + length (split xs).snd = length xs
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.length_split
[615, 1]
[628, 14]
exact ih
α : Type u_1 x y : α xs : List α ih : length (split xs).fst + length (split xs).snd = length xs ⊢ length (split xs).fst + length (split xs).snd = length xs
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.length_mergeSortWith
[630, 1]
[654, 56]
simp only [mergeSortWith, mergeWith, split, length_mergeWith, length]
α : Type u_1 cmp : α → α → Ordering x y : α xs : List α term₁ : Nat.succ (length (split xs).fst) < Nat.succ (Nat.succ (length xs)) term₂ : Nat.succ (length (split xs).snd) < Nat.succ (Nat.succ (length xs)) ih₁ : length (mergeSortWith cmp (x :: (split xs).fst)) = length (x :: (split xs).fst) ih₂ : length (mergeSortWith cmp (y :: (split xs).snd)) = length (y :: (split xs).snd) ⊢ length (mergeSortWith cmp (x :: y :: xs)) = length (x :: y :: xs)
α : Type u_1 cmp : α → α → Ordering x y : α xs : List α term₁ : Nat.succ (length (split xs).fst) < Nat.succ (Nat.succ (length xs)) term₂ : Nat.succ (length (split xs).snd) < Nat.succ (Nat.succ (length xs)) ih₁ : length (mergeSortWith cmp (x :: (split xs).fst)) = length (x :: (split xs).fst) ih₂ : length (mergeSortWith cmp (y :: (split xs).snd)) = length (y :: (split xs).snd) ⊢ length (mergeSortWith cmp (x :: (split xs).fst)) + length (mergeSortWith cmp (y :: (split xs).snd)) = length xs + 1 + 1
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.length_mergeSortWith
[630, 1]
[654, 56]
rw [ih₁, ih₂]
α : Type u_1 cmp : α → α → Ordering x y : α xs : List α term₁ : Nat.succ (length (split xs).fst) < Nat.succ (Nat.succ (length xs)) term₂ : Nat.succ (length (split xs).snd) < Nat.succ (Nat.succ (length xs)) ih₁ : length (mergeSortWith cmp (x :: (split xs).fst)) = length (x :: (split xs).fst) ih₂ : length (mergeSortWith cmp (y :: (split xs).snd)) = length (y :: (split xs).snd) ⊢ length (mergeSortWith cmp (x :: (split xs).fst)) + length (mergeSortWith cmp (y :: (split xs).snd)) = length xs + 1 + 1
α : Type u_1 cmp : α → α → Ordering x y : α xs : List α term₁ : Nat.succ (length (split xs).fst) < Nat.succ (Nat.succ (length xs)) term₂ : Nat.succ (length (split xs).snd) < Nat.succ (Nat.succ (length xs)) ih₁ : length (mergeSortWith cmp (x :: (split xs).fst)) = length (x :: (split xs).fst) ih₂ : length (mergeSortWith cmp (y :: (split xs).snd)) = length (y :: (split xs).snd) ⊢ length (x :: (split xs).fst) + length (y :: (split xs).snd) = length xs + 1 + 1
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.length_mergeSortWith
[630, 1]
[654, 56]
simp only [length]
α : Type u_1 cmp : α → α → Ordering x y : α xs : List α term₁ : Nat.succ (length (split xs).fst) < Nat.succ (Nat.succ (length xs)) term₂ : Nat.succ (length (split xs).snd) < Nat.succ (Nat.succ (length xs)) ih₁ : length (mergeSortWith cmp (x :: (split xs).fst)) = length (x :: (split xs).fst) ih₂ : length (mergeSortWith cmp (y :: (split xs).snd)) = length (y :: (split xs).snd) ⊢ length (x :: (split xs).fst) + length (y :: (split xs).snd) = length xs + 1 + 1
α : Type u_1 cmp : α → α → Ordering x y : α xs : List α term₁ : Nat.succ (length (split xs).fst) < Nat.succ (Nat.succ (length xs)) term₂ : Nat.succ (length (split xs).snd) < Nat.succ (Nat.succ (length xs)) ih₁ : length (mergeSortWith cmp (x :: (split xs).fst)) = length (x :: (split xs).fst) ih₂ : length (mergeSortWith cmp (y :: (split xs).snd)) = length (y :: (split xs).snd) ⊢ length (split xs).fst + 1 + (length (split xs).snd + 1) = length xs + 1 + 1
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.length_mergeSortWith
[630, 1]
[654, 56]
rw [Nat.add_assoc (length (split xs).1), Nat.add_comm 1, Nat.add_assoc (length (split xs).2), ←Nat.add_assoc (length (split xs).1), Nat.add_assoc (length xs)]
α : Type u_1 cmp : α → α → Ordering x y : α xs : List α term₁ : Nat.succ (length (split xs).fst) < Nat.succ (Nat.succ (length xs)) term₂ : Nat.succ (length (split xs).snd) < Nat.succ (Nat.succ (length xs)) ih₁ : length (mergeSortWith cmp (x :: (split xs).fst)) = length (x :: (split xs).fst) ih₂ : length (mergeSortWith cmp (y :: (split xs).snd)) = length (y :: (split xs).snd) ⊢ length (split xs).fst + 1 + (length (split xs).snd + 1) = length xs + 1 + 1
α : Type u_1 cmp : α → α → Ordering x y : α xs : List α term₁ : Nat.succ (length (split xs).fst) < Nat.succ (Nat.succ (length xs)) term₂ : Nat.succ (length (split xs).snd) < Nat.succ (Nat.succ (length xs)) ih₁ : length (mergeSortWith cmp (x :: (split xs).fst)) = length (x :: (split xs).fst) ih₂ : length (mergeSortWith cmp (y :: (split xs).snd)) = length (y :: (split xs).snd) ⊢ length (split xs).fst + length (split xs).snd + (1 + 1) = length xs + (1 + 1)
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.length_mergeSortWith
[630, 1]
[654, 56]
apply congrArg (λ x => x + (1 + 1))
α : Type u_1 cmp : α → α → Ordering x y : α xs : List α term₁ : Nat.succ (length (split xs).fst) < Nat.succ (Nat.succ (length xs)) term₂ : Nat.succ (length (split xs).snd) < Nat.succ (Nat.succ (length xs)) ih₁ : length (mergeSortWith cmp (x :: (split xs).fst)) = length (x :: (split xs).fst) ih₂ : length (mergeSortWith cmp (y :: (split xs).snd)) = length (y :: (split xs).snd) ⊢ length (split xs).fst + length (split xs).snd + (1 + 1) = length xs + (1 + 1)
α : Type u_1 cmp : α → α → Ordering x y : α xs : List α term₁ : Nat.succ (length (split xs).fst) < Nat.succ (Nat.succ (length xs)) term₂ : Nat.succ (length (split xs).snd) < Nat.succ (Nat.succ (length xs)) ih₁ : length (mergeSortWith cmp (x :: (split xs).fst)) = length (x :: (split xs).fst) ih₂ : length (mergeSortWith cmp (y :: (split xs).snd)) = length (y :: (split xs).snd) ⊢ length (split xs).fst + length (split xs).snd = length xs
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
List.length_mergeSortWith
[630, 1]
[654, 56]
apply length_split
α : Type u_1 cmp : α → α → Ordering x y : α xs : List α term₁ : Nat.succ (length (split xs).fst) < Nat.succ (Nat.succ (length xs)) term₂ : Nat.succ (length (split xs).snd) < Nat.succ (Nat.succ (length xs)) ih₁ : length (mergeSortWith cmp (x :: (split xs).fst)) = length (x :: (split xs).fst) ih₂ : length (mergeSortWith cmp (y :: (split xs).snd)) = length (y :: (split xs).snd) ⊢ length (split xs).fst + length (split xs).snd = length xs
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Nat.sub_le_iff_left
[677, 1]
[686, 13]
apply Iff.intro
a b c : Nat ⊢ a - b ≤ c ↔ a ≤ b + c
case mp a b c : Nat ⊢ a - b ≤ c → a ≤ b + c case mpr a b c : Nat ⊢ a ≤ b + c → a - b ≤ c
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Nat.sub_le_iff_left
[677, 1]
[686, 13]
. intros h rw [Nat.add_comm] apply Nat.le_add_of_sub_le exact h
case mp a b c : Nat ⊢ a - b ≤ c → a ≤ b + c case mpr a b c : Nat ⊢ a ≤ b + c → a - b ≤ c
case mpr a b c : Nat ⊢ a ≤ b + c → a - b ≤ c
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Nat.sub_le_iff_left
[677, 1]
[686, 13]
. intros h apply Nat.sub_le_of_le_add rw [Nat.add_comm] exact h
case mpr a b c : Nat ⊢ a ≤ b + c → a - b ≤ c
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Nat.sub_le_iff_left
[677, 1]
[686, 13]
intros h
case mp a b c : Nat ⊢ a - b ≤ c → a ≤ b + c
case mp a b c : Nat h : a - b ≤ c ⊢ a ≤ b + c
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Nat.sub_le_iff_left
[677, 1]
[686, 13]
rw [Nat.add_comm]
case mp a b c : Nat h : a - b ≤ c ⊢ a ≤ b + c
case mp a b c : Nat h : a - b ≤ c ⊢ a ≤ c + b
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/BuiltinExtensions.lean
Nat.sub_le_iff_left
[677, 1]
[686, 13]
apply Nat.le_add_of_sub_le
case mp a b c : Nat h : a - b ≤ c ⊢ a ≤ c + b
case mp.h a b c : Nat h : a - b ≤ c ⊢ a - b ≤ c