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.not_mem_matchKey_self_map_snd | [857, 1] | [875, 28] | intro hneg | κ : Type u_1
ν : Type u_2
inst✝ : DecidableEq κ
k : κ
kvs : List (κ × ν)
⊢ ¬k ∈ map Prod.fst (matchKey kvs k).snd | κ : Type u_1
ν : Type u_2
inst✝ : DecidableEq κ
k : κ
kvs : List (κ × ν)
hneg : k ∈ map Prod.fst (matchKey kvs k).snd
⊢ False |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.not_mem_matchKey_self_map_snd | [857, 1] | [875, 28] | induction kvs with
| nil => cases hneg
| cons kv kvs ih =>
apply ih
simp only [matchKey] at hneg
cases Decidable.em (kv.fst = k) with
| inl heq =>
simp only [heq, ite_true] at hneg
assumption
| inr hneq =>
simp only [hneq, ite_false] at hneg
simp only [map] at hneg
cases hneg with
| head => exact absurd rfl hneq
| tail _ h => exact h | κ : Type u_1
ν : Type u_2
inst✝ : DecidableEq κ
k : κ
kvs : List (κ × ν)
hneg : k ∈ map Prod.fst (matchKey kvs k).snd
⊢ False | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.not_mem_matchKey_self_map_snd | [857, 1] | [875, 28] | cases hneg | case nil
κ : Type u_1
ν : Type u_2
inst✝ : DecidableEq κ
k : κ
hneg : k ∈ map Prod.fst (matchKey [] k).snd
⊢ False | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.not_mem_matchKey_self_map_snd | [857, 1] | [875, 28] | apply ih | case cons
κ : Type u_1
ν : Type u_2
inst✝ : DecidableEq κ
k : κ
kv : κ × ν
kvs : List (κ × ν)
ih : k ∈ map Prod.fst (matchKey kvs k).snd → False
hneg : k ∈ map Prod.fst (matchKey (kv :: kvs) k).snd
⊢ False | case cons
κ : Type u_1
ν : Type u_2
inst✝ : DecidableEq κ
k : κ
kv : κ × ν
kvs : List (κ × ν)
ih : k ∈ map Prod.fst (matchKey kvs k).snd → False
hneg : k ∈ map Prod.fst (matchKey (kv :: kvs) k).snd
⊢ k ∈ map Prod.fst (matchKey kvs k).snd |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.not_mem_matchKey_self_map_snd | [857, 1] | [875, 28] | simp only [matchKey] at hneg | case cons
κ : Type u_1
ν : Type u_2
inst✝ : DecidableEq κ
k : κ
kv : κ × ν
kvs : List (κ × ν)
ih : k ∈ map Prod.fst (matchKey kvs k).snd → False
hneg : k ∈ map Prod.fst (matchKey (kv :: kvs) k).snd
⊢ k ∈ map Prod.fst (matchKey kvs k).snd | case cons
κ : Type u_1
ν : Type u_2
inst✝ : DecidableEq κ
k : κ
kv : κ × ν
kvs : List (κ × ν)
ih : k ∈ map Prod.fst (matchKey kvs k).snd → False
hneg :
k ∈
map Prod.fst
(if kv.fst = k then (kv.snd :: (matchKey kvs k).fst, (matchKey kvs k).snd)
else ((matchKey kvs k).fst, (kv.fst, kv.snd) :: (matchKey kvs k).snd)).snd
⊢ k ∈ map Prod.fst (matchKey kvs k).snd |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.not_mem_matchKey_self_map_snd | [857, 1] | [875, 28] | cases Decidable.em (kv.fst = k) with
| inl heq =>
simp only [heq, ite_true] at hneg
assumption
| inr hneq =>
simp only [hneq, ite_false] at hneg
simp only [map] at hneg
cases hneg with
| head => exact absurd rfl hneq
| tail _ h => exact h | case cons
κ : Type u_1
ν : Type u_2
inst✝ : DecidableEq κ
k : κ
kv : κ × ν
kvs : List (κ × ν)
ih : k ∈ map Prod.fst (matchKey kvs k).snd → False
hneg :
k ∈
map Prod.fst
(if kv.fst = k then (kv.snd :: (matchKey kvs k).fst, (matchKey kvs k).snd)
else ((matchKey kvs k).fst, (kv.fst, kv.snd) :: (matchKey kvs k).snd)).snd
⊢ k ∈ map Prod.fst (matchKey kvs k).snd | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.not_mem_matchKey_self_map_snd | [857, 1] | [875, 28] | simp only [heq, ite_true] at hneg | case cons.inl
κ : Type u_1
ν : Type u_2
inst✝ : DecidableEq κ
k : κ
kv : κ × ν
kvs : List (κ × ν)
ih : k ∈ map Prod.fst (matchKey kvs k).snd → False
hneg :
k ∈
map Prod.fst
(if kv.fst = k then (kv.snd :: (matchKey kvs k).fst, (matchKey kvs k).snd)
else ((matchKey kvs k).fst, (kv.fst, kv.snd) :: (matchKey kvs k).snd)).snd
heq : kv.fst = k
⊢ k ∈ map Prod.fst (matchKey kvs k).snd | case cons.inl
κ : Type u_1
ν : Type u_2
inst✝ : DecidableEq κ
k : κ
kv : κ × ν
kvs : List (κ × ν)
ih : k ∈ map Prod.fst (matchKey kvs k).snd → False
heq : kv.fst = k
hneg : k ∈ map Prod.fst (matchKey kvs k).snd
⊢ k ∈ map Prod.fst (matchKey kvs k).snd |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.not_mem_matchKey_self_map_snd | [857, 1] | [875, 28] | assumption | case cons.inl
κ : Type u_1
ν : Type u_2
inst✝ : DecidableEq κ
k : κ
kv : κ × ν
kvs : List (κ × ν)
ih : k ∈ map Prod.fst (matchKey kvs k).snd → False
heq : kv.fst = k
hneg : k ∈ map Prod.fst (matchKey kvs k).snd
⊢ k ∈ map Prod.fst (matchKey kvs k).snd | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.not_mem_matchKey_self_map_snd | [857, 1] | [875, 28] | simp only [hneq, ite_false] at hneg | case cons.inr
κ : Type u_1
ν : Type u_2
inst✝ : DecidableEq κ
k : κ
kv : κ × ν
kvs : List (κ × ν)
ih : k ∈ map Prod.fst (matchKey kvs k).snd → False
hneg :
k ∈
map Prod.fst
(if kv.fst = k then (kv.snd :: (matchKey kvs k).fst, (matchKey kvs k).snd)
else ((matchKey kvs k).fst, (kv.fst, kv.snd) :: (matchKey kvs k).snd)).snd
hneq : ¬kv.fst = k
⊢ k ∈ map Prod.fst (matchKey kvs k).snd | case cons.inr
κ : Type u_1
ν : Type u_2
inst✝ : DecidableEq κ
k : κ
kv : κ × ν
kvs : List (κ × ν)
ih : k ∈ map Prod.fst (matchKey kvs k).snd → False
hneq : ¬kv.fst = k
hneg : k ∈ map Prod.fst ((kv.fst, kv.snd) :: (matchKey kvs k).snd)
⊢ k ∈ map Prod.fst (matchKey kvs k).snd |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.not_mem_matchKey_self_map_snd | [857, 1] | [875, 28] | simp only [map] at hneg | case cons.inr
κ : Type u_1
ν : Type u_2
inst✝ : DecidableEq κ
k : κ
kv : κ × ν
kvs : List (κ × ν)
ih : k ∈ map Prod.fst (matchKey kvs k).snd → False
hneq : ¬kv.fst = k
hneg : k ∈ map Prod.fst ((kv.fst, kv.snd) :: (matchKey kvs k).snd)
⊢ k ∈ map Prod.fst (matchKey kvs k).snd | case cons.inr
κ : Type u_1
ν : Type u_2
inst✝ : DecidableEq κ
k : κ
kv : κ × ν
kvs : List (κ × ν)
ih : k ∈ map Prod.fst (matchKey kvs k).snd → False
hneq : ¬kv.fst = k
hneg : k ∈ kv.fst :: map Prod.fst (matchKey kvs k).snd
⊢ k ∈ map Prod.fst (matchKey kvs k).snd |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.not_mem_matchKey_self_map_snd | [857, 1] | [875, 28] | cases hneg with
| head => exact absurd rfl hneq
| tail _ h => exact h | case cons.inr
κ : Type u_1
ν : Type u_2
inst✝ : DecidableEq κ
k : κ
kv : κ × ν
kvs : List (κ × ν)
ih : k ∈ map Prod.fst (matchKey kvs k).snd → False
hneq : ¬kv.fst = k
hneg : k ∈ kv.fst :: map Prod.fst (matchKey kvs k).snd
⊢ k ∈ map Prod.fst (matchKey kvs k).snd | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.not_mem_matchKey_self_map_snd | [857, 1] | [875, 28] | exact absurd rfl hneq | case cons.inr.head
κ : Type u_1
ν : Type u_2
inst✝ : DecidableEq κ
kv : κ × ν
kvs : List (κ × ν)
ih : kv.fst ∈ map Prod.fst (matchKey kvs kv.fst).snd → False
hneq : ¬kv.fst = kv.fst
⊢ kv.fst ∈ map Prod.fst (matchKey kvs kv.fst).snd | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.not_mem_matchKey_self_map_snd | [857, 1] | [875, 28] | exact h | case cons.inr.tail
κ : Type u_1
ν : Type u_2
inst✝ : DecidableEq κ
k : κ
kv : κ × ν
kvs : List (κ × ν)
ih : k ∈ map Prod.fst (matchKey kvs k).snd → False
hneq : ¬kv.fst = k
h : Mem k (map Prod.fst (matchKey kvs k).snd)
⊢ k ∈ map Prod.fst (matchKey kvs k).snd | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.fst_mem_of_pair_mem | [877, 1] | [881, 80] | contradiction | α : Type u_1
β : Type u_2
x : α
y : β
hxy : (x, y) ∈ []
⊢ x ∈ map Prod.fst [] | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.mem_reverse_iff | [946, 1] | [967, 52] | rw [reverse_eq_reverseSpec] | α : Type u_1
x : α
xs : List α
⊢ x ∈ xs ↔ x ∈ reverse xs | α : Type u_1
x : α
xs : List α
⊢ x ∈ xs ↔ x ∈ reverseSpec xs |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.mem_reverse_iff | [946, 1] | [967, 52] | apply Iff.intro | α : Type u_1
x : α
xs : List α
⊢ x ∈ xs ↔ x ∈ reverseSpec xs | case mp
α : Type u_1
x : α
xs : List α
⊢ x ∈ xs → x ∈ reverseSpec xs
case mpr
α : Type u_1
x : α
xs : List α
⊢ x ∈ reverseSpec xs → x ∈ xs |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.mem_reverse_iff | [946, 1] | [967, 52] | . intro hf
induction hf with
| head xs =>
simp only [reverseSpec]
apply mem_append_singleton
| @tail y ys h_x_ys ih =>
simp only [reverseSpec]
apply mem_append_front _ _ _ ih | case mp
α : Type u_1
x : α
xs : List α
⊢ x ∈ xs → x ∈ reverseSpec xs
case mpr
α : Type u_1
x : α
xs : List α
⊢ x ∈ reverseSpec xs → x ∈ xs | case mpr
α : Type u_1
x : α
xs : List α
⊢ x ∈ reverseSpec xs → x ∈ xs |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.mem_reverse_iff | [946, 1] | [967, 52] | . intro hb
induction xs with
| nil => contradiction
| cons y ys ih =>
simp only [reverseSpec] at hb
rw [List.mem_append_comm] at hb
simp only [HAppend.hAppend, Append.append, List.append] at hb
cases hb with
| head => exact Mem.head _
| tail _ htail => exact Mem.tail _ (ih htail) | case mpr
α : Type u_1
x : α
xs : List α
⊢ x ∈ reverseSpec xs → x ∈ xs | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.mem_reverse_iff | [946, 1] | [967, 52] | intro hf | case mp
α : Type u_1
x : α
xs : List α
⊢ x ∈ xs → x ∈ reverseSpec xs | case mp
α : Type u_1
x : α
xs : List α
hf : x ∈ xs
⊢ x ∈ reverseSpec xs |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.mem_reverse_iff | [946, 1] | [967, 52] | induction hf with
| head xs =>
simp only [reverseSpec]
apply mem_append_singleton
| @tail y ys h_x_ys ih =>
simp only [reverseSpec]
apply mem_append_front _ _ _ ih | case mp
α : Type u_1
x : α
xs : List α
hf : x ∈ xs
⊢ x ∈ reverseSpec xs | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.mem_reverse_iff | [946, 1] | [967, 52] | simp only [reverseSpec] | case mp.head
α : Type u_1
x : α
xs✝ xs : List α
⊢ x ∈ reverseSpec (x :: xs) | case mp.head
α : Type u_1
x : α
xs✝ xs : List α
⊢ x ∈ reverseSpec xs ++ [x] |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.mem_reverse_iff | [946, 1] | [967, 52] | apply mem_append_singleton | case mp.head
α : Type u_1
x : α
xs✝ xs : List α
⊢ x ∈ reverseSpec xs ++ [x] | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.mem_reverse_iff | [946, 1] | [967, 52] | simp only [reverseSpec] | case mp.tail
α : Type u_1
x : α
xs : List α
y : α
ys : List α
h_x_ys : Mem x ys
ih : x ∈ reverseSpec ys
⊢ x ∈ reverseSpec (y :: ys) | case mp.tail
α : Type u_1
x : α
xs : List α
y : α
ys : List α
h_x_ys : Mem x ys
ih : x ∈ reverseSpec ys
⊢ x ∈ reverseSpec ys ++ [y] |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.mem_reverse_iff | [946, 1] | [967, 52] | apply mem_append_front _ _ _ ih | case mp.tail
α : Type u_1
x : α
xs : List α
y : α
ys : List α
h_x_ys : Mem x ys
ih : x ∈ reverseSpec ys
⊢ x ∈ reverseSpec ys ++ [y] | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.mem_reverse_iff | [946, 1] | [967, 52] | intro hb | case mpr
α : Type u_1
x : α
xs : List α
⊢ x ∈ reverseSpec xs → x ∈ xs | case mpr
α : Type u_1
x : α
xs : List α
hb : x ∈ reverseSpec xs
⊢ x ∈ xs |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.mem_reverse_iff | [946, 1] | [967, 52] | induction xs with
| nil => contradiction
| cons y ys ih =>
simp only [reverseSpec] at hb
rw [List.mem_append_comm] at hb
simp only [HAppend.hAppend, Append.append, List.append] at hb
cases hb with
| head => exact Mem.head _
| tail _ htail => exact Mem.tail _ (ih htail) | case mpr
α : Type u_1
x : α
xs : List α
hb : x ∈ reverseSpec xs
⊢ x ∈ xs | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.mem_reverse_iff | [946, 1] | [967, 52] | contradiction | case mpr.nil
α : Type u_1
x : α
hb : x ∈ reverseSpec []
⊢ x ∈ [] | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.mem_reverse_iff | [946, 1] | [967, 52] | simp only [reverseSpec] at hb | case mpr.cons
α : Type u_1
x y : α
ys : List α
ih : x ∈ reverseSpec ys → x ∈ ys
hb : x ∈ reverseSpec (y :: ys)
⊢ x ∈ y :: ys | case mpr.cons
α : Type u_1
x y : α
ys : List α
ih : x ∈ reverseSpec ys → x ∈ ys
hb : x ∈ reverseSpec ys ++ [y]
⊢ x ∈ y :: ys |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.mem_reverse_iff | [946, 1] | [967, 52] | rw [List.mem_append_comm] at hb | case mpr.cons
α : Type u_1
x y : α
ys : List α
ih : x ∈ reverseSpec ys → x ∈ ys
hb : x ∈ reverseSpec ys ++ [y]
⊢ x ∈ y :: ys | case mpr.cons
α : Type u_1
x y : α
ys : List α
ih : x ∈ reverseSpec ys → x ∈ ys
hb : x ∈ [y] ++ reverseSpec ys
⊢ x ∈ y :: ys |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.mem_reverse_iff | [946, 1] | [967, 52] | simp only [HAppend.hAppend, Append.append, List.append] at hb | case mpr.cons
α : Type u_1
x y : α
ys : List α
ih : x ∈ reverseSpec ys → x ∈ ys
hb : x ∈ [y] ++ reverseSpec ys
⊢ x ∈ y :: ys | case mpr.cons
α : Type u_1
x y : α
ys : List α
ih : x ∈ reverseSpec ys → x ∈ ys
hb : x ∈ y :: reverseSpec ys
⊢ x ∈ y :: ys |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.mem_reverse_iff | [946, 1] | [967, 52] | cases hb with
| head => exact Mem.head _
| tail _ htail => exact Mem.tail _ (ih htail) | case mpr.cons
α : Type u_1
x y : α
ys : List α
ih : x ∈ reverseSpec ys → x ∈ ys
hb : x ∈ y :: reverseSpec ys
⊢ x ∈ y :: ys | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.mem_reverse_iff | [946, 1] | [967, 52] | exact Mem.head _ | case mpr.cons.head
α : Type u_1
x : α
ys : List α
ih : x ∈ reverseSpec ys → x ∈ ys
⊢ x ∈ x :: ys | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.mem_reverse_iff | [946, 1] | [967, 52] | exact Mem.tail _ (ih htail) | case mpr.cons.tail
α : Type u_1
x y : α
ys : List α
ih : x ∈ reverseSpec ys → x ∈ ys
htail : Mem x (reverseSpec ys)
⊢ x ∈ y :: ys | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.all_pred | [1004, 1] | [1026, 48] | simp only [all] | α : Type u_1
p : α → Prop
inst✝ : DecidablePred p
xs : List α
⊢ (all xs fun x => decide (p x)) = true ↔ ∀ (x : α), x ∈ xs → p x | α : Type u_1
p : α → Prop
inst✝ : DecidablePred p
xs : List α
⊢ foldr (fun a r => decide (p a) && r) true xs = true ↔ ∀ (x : α), x ∈ xs → p x |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.all_pred | [1004, 1] | [1026, 48] | apply Iff.intro | α : Type u_1
p : α → Prop
inst✝ : DecidablePred p
xs : List α
⊢ foldr (fun a r => decide (p a) && r) true xs = true ↔ ∀ (x : α), x ∈ xs → p x | case mp
α : Type u_1
p : α → Prop
inst✝ : DecidablePred p
xs : List α
⊢ foldr (fun a r => decide (p a) && r) true xs = true → ∀ (x : α), x ∈ xs → p x
case mpr
α : Type u_1
p : α → Prop
inst✝ : DecidablePred p
xs : List α
⊢ (∀ (x : α), x ∈ xs → p x) → foldr (fun a r => decide (p a) && r) true xs = true |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.all_pred | [1004, 1] | [1026, 48] | . intros hforward x hx
induction hx with
| head as =>
simp [foldr] at hforward
apply And.left hforward
| tail a h ih =>
apply ih
simp [foldr] at hforward
apply And.right hforward | case mp
α : Type u_1
p : α → Prop
inst✝ : DecidablePred p
xs : List α
⊢ foldr (fun a r => decide (p a) && r) true xs = true → ∀ (x : α), x ∈ xs → p x
case mpr
α : Type u_1
p : α → Prop
inst✝ : DecidablePred p
xs : List α
⊢ (∀ (x : α), x ∈ xs → p x) → foldr (fun a r => decide (p a) && r) true xs = true | case mpr
α : Type u_1
p : α → Prop
inst✝ : DecidablePred p
xs : List α
⊢ (∀ (x : α), x ∈ xs → p x) → foldr (fun a r => decide (p a) && r) true xs = true |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.all_pred | [1004, 1] | [1026, 48] | . intros hbackward
induction xs with
| nil => simp [foldr]
| cons x xs ih =>
simp [foldr]
apply And.intro
. apply hbackward x (List.Mem.head _)
. apply ih
intro x' hx'
apply hbackward _ $ List.Mem.tail _ hx' | case mpr
α : Type u_1
p : α → Prop
inst✝ : DecidablePred p
xs : List α
⊢ (∀ (x : α), x ∈ xs → p x) → foldr (fun a r => decide (p a) && r) true xs = true | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.all_pred | [1004, 1] | [1026, 48] | intros hforward x hx | case mp
α : Type u_1
p : α → Prop
inst✝ : DecidablePred p
xs : List α
⊢ foldr (fun a r => decide (p a) && r) true xs = true → ∀ (x : α), x ∈ xs → p x | case mp
α : Type u_1
p : α → Prop
inst✝ : DecidablePred p
xs : List α
hforward : foldr (fun a r => decide (p a) && r) true xs = true
x : α
hx : x ∈ xs
⊢ p x |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.all_pred | [1004, 1] | [1026, 48] | induction hx with
| head as =>
simp [foldr] at hforward
apply And.left hforward
| tail a h ih =>
apply ih
simp [foldr] at hforward
apply And.right hforward | case mp
α : Type u_1
p : α → Prop
inst✝ : DecidablePred p
xs : List α
hforward : foldr (fun a r => decide (p a) && r) true xs = true
x : α
hx : x ∈ xs
⊢ p x | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.all_pred | [1004, 1] | [1026, 48] | simp [foldr] at hforward | case mp.head
α : Type u_1
p : α → Prop
inst✝ : DecidablePred p
xs : List α
x : α
as : List α
hforward : foldr (fun a r => decide (p a) && r) true (x :: as) = true
⊢ p x | case mp.head
α : Type u_1
p : α → Prop
inst✝ : DecidablePred p
xs : List α
x : α
as : List α
hforward : p x ∧ foldr (fun a r => decide (p a) && r) true as = true
⊢ p x |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.all_pred | [1004, 1] | [1026, 48] | apply And.left hforward | case mp.head
α : Type u_1
p : α → Prop
inst✝ : DecidablePred p
xs : List α
x : α
as : List α
hforward : p x ∧ foldr (fun a r => decide (p a) && r) true as = true
⊢ p x | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.all_pred | [1004, 1] | [1026, 48] | apply ih | case mp.tail
α : Type u_1
p : α → Prop
inst✝ : DecidablePred p
xs : List α
x a : α
as✝ : List α
h : Mem x as✝
ih : foldr (fun a r => decide (p a) && r) true as✝ = true → p x
hforward : foldr (fun a r => decide (p a) && r) true (a :: as✝) = true
⊢ p x | case mp.tail
α : Type u_1
p : α → Prop
inst✝ : DecidablePred p
xs : List α
x a : α
as✝ : List α
h : Mem x as✝
ih : foldr (fun a r => decide (p a) && r) true as✝ = true → p x
hforward : foldr (fun a r => decide (p a) && r) true (a :: as✝) = true
⊢ foldr (fun a r => decide (p a) && r) true as✝ = true |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.all_pred | [1004, 1] | [1026, 48] | simp [foldr] at hforward | case mp.tail
α : Type u_1
p : α → Prop
inst✝ : DecidablePred p
xs : List α
x a : α
as✝ : List α
h : Mem x as✝
ih : foldr (fun a r => decide (p a) && r) true as✝ = true → p x
hforward : foldr (fun a r => decide (p a) && r) true (a :: as✝) = true
⊢ foldr (fun a r => decide (p a) && r) true as✝ = true | case mp.tail
α : Type u_1
p : α → Prop
inst✝ : DecidablePred p
xs : List α
x a : α
as✝ : List α
h : Mem x as✝
ih : foldr (fun a r => decide (p a) && r) true as✝ = true → p x
hforward : p a ∧ foldr (fun a r => decide (p a) && r) true as✝ = true
⊢ foldr (fun a r => decide (p a) && r) true as✝ = true |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.all_pred | [1004, 1] | [1026, 48] | apply And.right hforward | case mp.tail
α : Type u_1
p : α → Prop
inst✝ : DecidablePred p
xs : List α
x a : α
as✝ : List α
h : Mem x as✝
ih : foldr (fun a r => decide (p a) && r) true as✝ = true → p x
hforward : p a ∧ foldr (fun a r => decide (p a) && r) true as✝ = true
⊢ foldr (fun a r => decide (p a) && r) true as✝ = true | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.all_pred | [1004, 1] | [1026, 48] | intros hbackward | case mpr
α : Type u_1
p : α → Prop
inst✝ : DecidablePred p
xs : List α
⊢ (∀ (x : α), x ∈ xs → p x) → foldr (fun a r => decide (p a) && r) true xs = true | case mpr
α : Type u_1
p : α → Prop
inst✝ : DecidablePred p
xs : List α
hbackward : ∀ (x : α), x ∈ xs → p x
⊢ foldr (fun a r => decide (p a) && r) true xs = true |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.all_pred | [1004, 1] | [1026, 48] | induction xs with
| nil => simp [foldr]
| cons x xs ih =>
simp [foldr]
apply And.intro
. apply hbackward x (List.Mem.head _)
. apply ih
intro x' hx'
apply hbackward _ $ List.Mem.tail _ hx' | case mpr
α : Type u_1
p : α → Prop
inst✝ : DecidablePred p
xs : List α
hbackward : ∀ (x : α), x ∈ xs → p x
⊢ foldr (fun a r => decide (p a) && r) true xs = true | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.all_pred | [1004, 1] | [1026, 48] | simp [foldr] | case mpr.nil
α : Type u_1
p : α → Prop
inst✝ : DecidablePred p
hbackward : ∀ (x : α), x ∈ [] → p x
⊢ foldr (fun a r => decide (p a) && r) true [] = true | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.all_pred | [1004, 1] | [1026, 48] | simp [foldr] | case mpr.cons
α : Type u_1
p : α → Prop
inst✝ : DecidablePred p
x : α
xs : List α
ih : (∀ (x : α), x ∈ xs → p x) → foldr (fun a r => decide (p a) && r) true xs = true
hbackward : ∀ (x_1 : α), x_1 ∈ x :: xs → p x_1
⊢ foldr (fun a r => decide (p a) && r) true (x :: xs) = true | case mpr.cons
α : Type u_1
p : α → Prop
inst✝ : DecidablePred p
x : α
xs : List α
ih : (∀ (x : α), x ∈ xs → p x) → foldr (fun a r => decide (p a) && r) true xs = true
hbackward : ∀ (x_1 : α), x_1 ∈ x :: xs → p x_1
⊢ p x ∧ foldr (fun a r => decide (p a) && r) true xs = true |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.all_pred | [1004, 1] | [1026, 48] | apply And.intro | case mpr.cons
α : Type u_1
p : α → Prop
inst✝ : DecidablePred p
x : α
xs : List α
ih : (∀ (x : α), x ∈ xs → p x) → foldr (fun a r => decide (p a) && r) true xs = true
hbackward : ∀ (x_1 : α), x_1 ∈ x :: xs → p x_1
⊢ p x ∧ foldr (fun a r => decide (p a) && r) true xs = true | case mpr.cons.left
α : Type u_1
p : α → Prop
inst✝ : DecidablePred p
x : α
xs : List α
ih : (∀ (x : α), x ∈ xs → p x) → foldr (fun a r => decide (p a) && r) true xs = true
hbackward : ∀ (x_1 : α), x_1 ∈ x :: xs → p x_1
⊢ p x
case mpr.cons.right
α : Type u_1
p : α → Prop
inst✝ : DecidablePred p
x : α
xs : List α
ih : (∀ (x : α), x ∈ xs → p x) → foldr (fun a r => decide (p a) && r) true xs = true
hbackward : ∀ (x_1 : α), x_1 ∈ x :: xs → p x_1
⊢ foldr (fun a r => decide (p a) && r) true xs = true |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.all_pred | [1004, 1] | [1026, 48] | . apply hbackward x (List.Mem.head _) | case mpr.cons.left
α : Type u_1
p : α → Prop
inst✝ : DecidablePred p
x : α
xs : List α
ih : (∀ (x : α), x ∈ xs → p x) → foldr (fun a r => decide (p a) && r) true xs = true
hbackward : ∀ (x_1 : α), x_1 ∈ x :: xs → p x_1
⊢ p x
case mpr.cons.right
α : Type u_1
p : α → Prop
inst✝ : DecidablePred p
x : α
xs : List α
ih : (∀ (x : α), x ∈ xs → p x) → foldr (fun a r => decide (p a) && r) true xs = true
hbackward : ∀ (x_1 : α), x_1 ∈ x :: xs → p x_1
⊢ foldr (fun a r => decide (p a) && r) true xs = true | case mpr.cons.right
α : Type u_1
p : α → Prop
inst✝ : DecidablePred p
x : α
xs : List α
ih : (∀ (x : α), x ∈ xs → p x) → foldr (fun a r => decide (p a) && r) true xs = true
hbackward : ∀ (x_1 : α), x_1 ∈ x :: xs → p x_1
⊢ foldr (fun a r => decide (p a) && r) true xs = true |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.all_pred | [1004, 1] | [1026, 48] | . apply ih
intro x' hx'
apply hbackward _ $ List.Mem.tail _ hx' | case mpr.cons.right
α : Type u_1
p : α → Prop
inst✝ : DecidablePred p
x : α
xs : List α
ih : (∀ (x : α), x ∈ xs → p x) → foldr (fun a r => decide (p a) && r) true xs = true
hbackward : ∀ (x_1 : α), x_1 ∈ x :: xs → p x_1
⊢ foldr (fun a r => decide (p a) && r) true xs = true | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.all_pred | [1004, 1] | [1026, 48] | apply hbackward x (List.Mem.head _) | case mpr.cons.left
α : Type u_1
p : α → Prop
inst✝ : DecidablePred p
x : α
xs : List α
ih : (∀ (x : α), x ∈ xs → p x) → foldr (fun a r => decide (p a) && r) true xs = true
hbackward : ∀ (x_1 : α), x_1 ∈ x :: xs → p x_1
⊢ p x | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.all_pred | [1004, 1] | [1026, 48] | apply ih | case mpr.cons.right
α : Type u_1
p : α → Prop
inst✝ : DecidablePred p
x : α
xs : List α
ih : (∀ (x : α), x ∈ xs → p x) → foldr (fun a r => decide (p a) && r) true xs = true
hbackward : ∀ (x_1 : α), x_1 ∈ x :: xs → p x_1
⊢ foldr (fun a r => decide (p a) && r) true xs = true | case mpr.cons.right
α : Type u_1
p : α → Prop
inst✝ : DecidablePred p
x : α
xs : List α
ih : (∀ (x : α), x ∈ xs → p x) → foldr (fun a r => decide (p a) && r) true xs = true
hbackward : ∀ (x_1 : α), x_1 ∈ x :: xs → p x_1
⊢ ∀ (x : α), x ∈ xs → p x |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.all_pred | [1004, 1] | [1026, 48] | intro x' hx' | case mpr.cons.right
α : Type u_1
p : α → Prop
inst✝ : DecidablePred p
x : α
xs : List α
ih : (∀ (x : α), x ∈ xs → p x) → foldr (fun a r => decide (p a) && r) true xs = true
hbackward : ∀ (x_1 : α), x_1 ∈ x :: xs → p x_1
⊢ ∀ (x : α), x ∈ xs → p x | case mpr.cons.right
α : Type u_1
p : α → Prop
inst✝ : DecidablePred p
x : α
xs : List α
ih : (∀ (x : α), x ∈ xs → p x) → foldr (fun a r => decide (p a) && r) true xs = true
hbackward : ∀ (x_1 : α), x_1 ∈ x :: xs → p x_1
x' : α
hx' : x' ∈ xs
⊢ p x' |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.all_pred | [1004, 1] | [1026, 48] | apply hbackward _ $ List.Mem.tail _ hx' | case mpr.cons.right
α : Type u_1
p : α → Prop
inst✝ : DecidablePred p
x : α
xs : List α
ih : (∀ (x : α), x ∈ xs → p x) → foldr (fun a r => decide (p a) && r) true xs = true
hbackward : ∀ (x_1 : α), x_1 ∈ x :: xs → p x_1
x' : α
hx' : x' ∈ xs
⊢ p x' | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.mem_cons_iff_mem_singleton_or_tail | [1040, 1] | [1050, 34] | apply Iff.intro | α : Type u_1
y : α
ys : List α
x : α
⊢ x ∈ y :: ys ↔ x ∈ [y] ∨ x ∈ ys | case mp
α : Type u_1
y : α
ys : List α
x : α
⊢ x ∈ y :: ys → x ∈ [y] ∨ x ∈ ys
case mpr
α : Type u_1
y : α
ys : List α
x : α
⊢ x ∈ [y] ∨ x ∈ ys → x ∈ y :: ys |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.mem_cons_iff_mem_singleton_or_tail | [1040, 1] | [1050, 34] | . intro hf
cases hf with
| head => apply Or.intro_left _ (Mem.head _)
| tail _ h => apply Or.intro_right _ h | case mp
α : Type u_1
y : α
ys : List α
x : α
⊢ x ∈ y :: ys → x ∈ [y] ∨ x ∈ ys
case mpr
α : Type u_1
y : α
ys : List α
x : α
⊢ x ∈ [y] ∨ x ∈ ys → x ∈ y :: ys | case mpr
α : Type u_1
y : α
ys : List α
x : α
⊢ x ∈ [y] ∨ x ∈ ys → x ∈ y :: ys |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.mem_cons_iff_mem_singleton_or_tail | [1040, 1] | [1050, 34] | . intro hb
cases hb with
| inl h => rw [(mem_singleton_iff x y).mp h]; apply Mem.head
| inr h => apply Mem.tail _ h | case mpr
α : Type u_1
y : α
ys : List α
x : α
⊢ x ∈ [y] ∨ x ∈ ys → x ∈ y :: ys | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.mem_cons_iff_mem_singleton_or_tail | [1040, 1] | [1050, 34] | intro hf | case mp
α : Type u_1
y : α
ys : List α
x : α
⊢ x ∈ y :: ys → x ∈ [y] ∨ x ∈ ys | case mp
α : Type u_1
y : α
ys : List α
x : α
hf : x ∈ y :: ys
⊢ x ∈ [y] ∨ x ∈ ys |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.mem_cons_iff_mem_singleton_or_tail | [1040, 1] | [1050, 34] | cases hf with
| head => apply Or.intro_left _ (Mem.head _)
| tail _ h => apply Or.intro_right _ h | case mp
α : Type u_1
y : α
ys : List α
x : α
hf : x ∈ y :: ys
⊢ x ∈ [y] ∨ x ∈ ys | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.mem_cons_iff_mem_singleton_or_tail | [1040, 1] | [1050, 34] | apply Or.intro_left _ (Mem.head _) | case mp.head
α : Type u_1
y : α
ys : List α
⊢ y ∈ [y] ∨ y ∈ ys | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.mem_cons_iff_mem_singleton_or_tail | [1040, 1] | [1050, 34] | apply Or.intro_right _ h | case mp.tail
α : Type u_1
y : α
ys : List α
x : α
h : Mem x ys
⊢ x ∈ [y] ∨ x ∈ ys | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.mem_cons_iff_mem_singleton_or_tail | [1040, 1] | [1050, 34] | intro hb | case mpr
α : Type u_1
y : α
ys : List α
x : α
⊢ x ∈ [y] ∨ x ∈ ys → x ∈ y :: ys | case mpr
α : Type u_1
y : α
ys : List α
x : α
hb : x ∈ [y] ∨ x ∈ ys
⊢ x ∈ y :: ys |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.mem_cons_iff_mem_singleton_or_tail | [1040, 1] | [1050, 34] | cases hb with
| inl h => rw [(mem_singleton_iff x y).mp h]; apply Mem.head
| inr h => apply Mem.tail _ h | case mpr
α : Type u_1
y : α
ys : List α
x : α
hb : x ∈ [y] ∨ x ∈ ys
⊢ x ∈ y :: ys | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.mem_cons_iff_mem_singleton_or_tail | [1040, 1] | [1050, 34] | rw [(mem_singleton_iff x y).mp h] | case mpr.inl
α : Type u_1
y : α
ys : List α
x : α
h : x ∈ [y]
⊢ x ∈ y :: ys | case mpr.inl
α : Type u_1
y : α
ys : List α
x : α
h : x ∈ [y]
⊢ y ∈ y :: ys |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.mem_cons_iff_mem_singleton_or_tail | [1040, 1] | [1050, 34] | apply Mem.head | case mpr.inl
α : Type u_1
y : α
ys : List α
x : α
h : x ∈ [y]
⊢ y ∈ y :: ys | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.mem_cons_iff_mem_singleton_or_tail | [1040, 1] | [1050, 34] | apply Mem.tail _ h | case mpr.inr
α : Type u_1
y : α
ys : List α
x : α
h : x ∈ ys
⊢ x ∈ y :: ys | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.filter_filter | [1055, 1] | [1073, 28] | rw [filter_eq_filterSpec, filter_eq_filterSpec, filter_eq_filterSpec] | α : Type u_1
p₁ p₂ : α → Bool
xs : List α
⊢ filter p₁ (filter p₂ xs) = filter (fun x => decide (p₂ x = true ∧ p₁ x = true)) xs | α : Type u_1
p₁ p₂ : α → Bool
xs : List α
⊢ filterSpec p₁ (filterSpec p₂ xs) = filterSpec (fun x => decide (p₂ x = true ∧ p₁ x = true)) xs |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.filter_filter | [1055, 1] | [1073, 28] | induction xs with
| nil => simp [filterSpec]
| cons x xs ih =>
cases h₂ : p₂ x with
| false =>
simp only [filterSpec, h₂, ite_false]
exact ih
| true =>
simp only [filterSpec, h₂, ite_true]
cases h₁ : p₁ x with
| false =>
simp only [filterSpec, h₁, h₂, ite_false]
exact ih
| true =>
simp only [filterSpec, h₁, h₂, ite_true]
exact congrArg _ ih | α : Type u_1
p₁ p₂ : α → Bool
xs : List α
⊢ filterSpec p₁ (filterSpec p₂ xs) = filterSpec (fun x => decide (p₂ x = true ∧ p₁ x = true)) xs | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.filter_filter | [1055, 1] | [1073, 28] | simp [filterSpec] | case nil
α : Type u_1
p₁ p₂ : α → Bool
⊢ filterSpec p₁ (filterSpec p₂ []) = filterSpec (fun x => decide (p₂ x = true ∧ p₁ x = true)) [] | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.filter_filter | [1055, 1] | [1073, 28] | cases h₂ : p₂ x with
| false =>
simp only [filterSpec, h₂, ite_false]
exact ih
| true =>
simp only [filterSpec, h₂, ite_true]
cases h₁ : p₁ x with
| false =>
simp only [filterSpec, h₁, h₂, ite_false]
exact ih
| true =>
simp only [filterSpec, h₁, h₂, ite_true]
exact congrArg _ ih | case cons
α : Type u_1
p₁ p₂ : α → Bool
x : α
xs : List α
ih : filterSpec p₁ (filterSpec p₂ xs) = filterSpec (fun x => decide (p₂ x = true ∧ p₁ x = true)) xs
⊢ filterSpec p₁ (filterSpec p₂ (x :: xs)) = filterSpec (fun x => decide (p₂ x = true ∧ p₁ x = true)) (x :: xs) | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.filter_filter | [1055, 1] | [1073, 28] | simp only [filterSpec, h₂, ite_false] | case cons.false
α : Type u_1
p₁ p₂ : α → Bool
x : α
xs : List α
ih : filterSpec p₁ (filterSpec p₂ xs) = filterSpec (fun x => decide (p₂ x = true ∧ p₁ x = true)) xs
h₂ : p₂ x = false
⊢ filterSpec p₁ (filterSpec p₂ (x :: xs)) = filterSpec (fun x => decide (p₂ x = true ∧ p₁ x = true)) (x :: xs) | case cons.false
α : Type u_1
p₁ p₂ : α → Bool
x : α
xs : List α
ih : filterSpec p₁ (filterSpec p₂ xs) = filterSpec (fun x => decide (p₂ x = true ∧ p₁ x = true)) xs
h₂ : p₂ x = false
⊢ filterSpec p₁ (filterSpec p₂ xs) =
if decide (False ∧ p₁ x = true) = true then x :: filterSpec (fun x => decide (p₂ x = true ∧ p₁ x = true)) xs
else filterSpec (fun x => decide (p₂ x = true ∧ p₁ x = true)) xs |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.filter_filter | [1055, 1] | [1073, 28] | exact ih | case cons.false
α : Type u_1
p₁ p₂ : α → Bool
x : α
xs : List α
ih : filterSpec p₁ (filterSpec p₂ xs) = filterSpec (fun x => decide (p₂ x = true ∧ p₁ x = true)) xs
h₂ : p₂ x = false
⊢ filterSpec p₁ (filterSpec p₂ xs) =
if decide (False ∧ p₁ x = true) = true then x :: filterSpec (fun x => decide (p₂ x = true ∧ p₁ x = true)) xs
else filterSpec (fun x => decide (p₂ x = true ∧ p₁ x = true)) xs | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.filter_filter | [1055, 1] | [1073, 28] | simp only [filterSpec, h₂, ite_true] | case cons.true
α : Type u_1
p₁ p₂ : α → Bool
x : α
xs : List α
ih : filterSpec p₁ (filterSpec p₂ xs) = filterSpec (fun x => decide (p₂ x = true ∧ p₁ x = true)) xs
h₂ : p₂ x = true
⊢ filterSpec p₁ (filterSpec p₂ (x :: xs)) = filterSpec (fun x => decide (p₂ x = true ∧ p₁ x = true)) (x :: xs) | case cons.true
α : Type u_1
p₁ p₂ : α → Bool
x : α
xs : List α
ih : filterSpec p₁ (filterSpec p₂ xs) = filterSpec (fun x => decide (p₂ x = true ∧ p₁ x = true)) xs
h₂ : p₂ x = true
⊢ (if p₁ x = true then x :: filterSpec p₁ (filterSpec p₂ xs) else filterSpec p₁ (filterSpec p₂ xs)) =
if decide (True ∧ p₁ x = true) = true then x :: filterSpec (fun x => decide (p₂ x = true ∧ p₁ x = true)) xs
else filterSpec (fun x => decide (p₂ x = true ∧ p₁ x = true)) xs |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.filter_filter | [1055, 1] | [1073, 28] | cases h₁ : p₁ x with
| false =>
simp only [filterSpec, h₁, h₂, ite_false]
exact ih
| true =>
simp only [filterSpec, h₁, h₂, ite_true]
exact congrArg _ ih | case cons.true
α : Type u_1
p₁ p₂ : α → Bool
x : α
xs : List α
ih : filterSpec p₁ (filterSpec p₂ xs) = filterSpec (fun x => decide (p₂ x = true ∧ p₁ x = true)) xs
h₂ : p₂ x = true
⊢ (if p₁ x = true then x :: filterSpec p₁ (filterSpec p₂ xs) else filterSpec p₁ (filterSpec p₂ xs)) =
if decide (True ∧ p₁ x = true) = true then x :: filterSpec (fun x => decide (p₂ x = true ∧ p₁ x = true)) xs
else filterSpec (fun x => decide (p₂ x = true ∧ p₁ x = true)) xs | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.filter_filter | [1055, 1] | [1073, 28] | simp only [filterSpec, h₁, h₂, ite_false] | case cons.true.false
α : Type u_1
p₁ p₂ : α → Bool
x : α
xs : List α
ih : filterSpec p₁ (filterSpec p₂ xs) = filterSpec (fun x => decide (p₂ x = true ∧ p₁ x = true)) xs
h₂ : p₂ x = true
h₁ : p₁ x = false
⊢ (if false = true then x :: filterSpec p₁ (filterSpec p₂ xs) else filterSpec p₁ (filterSpec p₂ xs)) =
if decide (True ∧ false = true) = true then x :: filterSpec (fun x => decide (p₂ x = true ∧ p₁ x = true)) xs
else filterSpec (fun x => decide (p₂ x = true ∧ p₁ x = true)) xs | case cons.true.false
α : Type u_1
p₁ p₂ : α → Bool
x : α
xs : List α
ih : filterSpec p₁ (filterSpec p₂ xs) = filterSpec (fun x => decide (p₂ x = true ∧ p₁ x = true)) xs
h₂ : p₂ x = true
h₁ : p₁ x = false
⊢ filterSpec p₁ (filterSpec p₂ xs) =
if decide (True ∧ False) = true then x :: filterSpec (fun x => decide (p₂ x = true ∧ p₁ x = true)) xs
else filterSpec (fun x => decide (p₂ x = true ∧ p₁ x = true)) xs |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.filter_filter | [1055, 1] | [1073, 28] | exact ih | case cons.true.false
α : Type u_1
p₁ p₂ : α → Bool
x : α
xs : List α
ih : filterSpec p₁ (filterSpec p₂ xs) = filterSpec (fun x => decide (p₂ x = true ∧ p₁ x = true)) xs
h₂ : p₂ x = true
h₁ : p₁ x = false
⊢ filterSpec p₁ (filterSpec p₂ xs) =
if decide (True ∧ False) = true then x :: filterSpec (fun x => decide (p₂ x = true ∧ p₁ x = true)) xs
else filterSpec (fun x => decide (p₂ x = true ∧ p₁ x = true)) xs | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.filter_filter | [1055, 1] | [1073, 28] | simp only [filterSpec, h₁, h₂, ite_true] | case cons.true.true
α : Type u_1
p₁ p₂ : α → Bool
x : α
xs : List α
ih : filterSpec p₁ (filterSpec p₂ xs) = filterSpec (fun x => decide (p₂ x = true ∧ p₁ x = true)) xs
h₂ : p₂ x = true
h₁ : p₁ x = true
⊢ (if true = true then x :: filterSpec p₁ (filterSpec p₂ xs) else filterSpec p₁ (filterSpec p₂ xs)) =
if decide (True ∧ true = true) = true then x :: filterSpec (fun x => decide (p₂ x = true ∧ p₁ x = true)) xs
else filterSpec (fun x => decide (p₂ x = true ∧ p₁ x = true)) xs | case cons.true.true
α : Type u_1
p₁ p₂ : α → Bool
x : α
xs : List α
ih : filterSpec p₁ (filterSpec p₂ xs) = filterSpec (fun x => decide (p₂ x = true ∧ p₁ x = true)) xs
h₂ : p₂ x = true
h₁ : p₁ x = true
⊢ x :: filterSpec p₁ (filterSpec p₂ xs) =
if decide (True ∧ True) = true then x :: filterSpec (fun x => decide (p₂ x = true ∧ p₁ x = true)) xs
else filterSpec (fun x => decide (p₂ x = true ∧ p₁ x = true)) xs |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.filter_filter | [1055, 1] | [1073, 28] | exact congrArg _ ih | case cons.true.true
α : Type u_1
p₁ p₂ : α → Bool
x : α
xs : List α
ih : filterSpec p₁ (filterSpec p₂ xs) = filterSpec (fun x => decide (p₂ x = true ∧ p₁ x = true)) xs
h₂ : p₂ x = true
h₁ : p₁ x = true
⊢ x :: filterSpec p₁ (filterSpec p₂ xs) =
if decide (True ∧ True) = true then x :: filterSpec (fun x => decide (p₂ x = true ∧ p₁ x = true)) xs
else filterSpec (fun x => decide (p₂ x = true ∧ p₁ x = true)) xs | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.uniqueAux_acc_append_filter | [1075, 1] | [1134, 25] | simp [uniqueAux, reverse, reverseAux, unique] | α : Type u_1
inst✝ : DecidableEq α
acc : List α
⊢ uniqueAux [] acc = reverse acc ++ unique (filter (fun x => decide ¬x ∈ acc) []) | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.uniqueAux_acc_append_filter | [1075, 1] | [1134, 25] | simp only [uniqueAux, filter] | α : Type u_1
inst✝ : DecidableEq α
x : α
xs acc : List α
hterm : length (filter (fun a => decide ¬a ∈ acc) xs) < Nat.succ (length xs)
hterm' : length xs < Nat.succ (length xs)
ih₁ : uniqueAux xs acc = reverse acc ++ unique (filter (fun x => decide ¬x ∈ acc) xs)
ih₂ : uniqueAux xs (x :: acc) = reverse (x :: acc) ++ unique (filter (fun x_1 => decide ¬x_1 ∈ x :: acc) xs)
ih₃ :
uniqueAux (filter (fun a => decide ¬a ∈ acc) xs) [x] =
reverse [x] ++ unique (filter (fun x_1 => decide ¬x_1 ∈ [x]) (filter (fun a => decide ¬a ∈ acc) xs))
⊢ uniqueAux (x :: xs) acc = reverse acc ++ unique (filter (fun x => decide ¬x ∈ acc) (x :: xs)) | α : Type u_1
inst✝ : DecidableEq α
x : α
xs acc : List α
hterm : length (filter (fun a => decide ¬a ∈ acc) xs) < Nat.succ (length xs)
hterm' : length xs < Nat.succ (length xs)
ih₁ : uniqueAux xs acc = reverse acc ++ unique (filter (fun x => decide ¬x ∈ acc) xs)
ih₂ : uniqueAux xs (x :: acc) = reverse (x :: acc) ++ unique (filter (fun x_1 => decide ¬x_1 ∈ x :: acc) xs)
ih₃ :
uniqueAux (filter (fun a => decide ¬a ∈ acc) xs) [x] =
reverse [x] ++ unique (filter (fun x_1 => decide ¬x_1 ∈ [x]) (filter (fun a => decide ¬a ∈ acc) xs))
⊢ (if x ∈ acc then uniqueAux xs acc else uniqueAux xs (x :: acc)) =
reverse acc ++
unique
(match decide ¬x ∈ acc with
| true => x :: filter (fun x => decide ¬x ∈ acc) xs
| false => filter (fun x => decide ¬x ∈ acc) xs) |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.uniqueAux_acc_append_filter | [1075, 1] | [1134, 25] | cases Decidable.em (x ∈ acc) with
| inl hin =>
simp only [hin, ite_true, not_true_eq_false, decide_False]
rw [ih₁]
| inr hout =>
simp only [hout, ite_false, not_false_eq_true, decide_True]
simp only [reverse_singleton, singleton_append, unique,
uniqueAux, List.not_mem_nil, ite_false]
rw [ih₂]
simp only [reverse_cons, append_assoc, singleton_append]
apply congrArg
simp only [unique]
rw [ih₃]
rw [reverse_singleton, singleton_append, filter_filter]
have : (λ x_1 => decide (
(decide ¬x_1 ∈ acc) = true ∧ (decide ¬x_1 ∈ [x]) = true)
) = (λ x_1 => decide (¬x_1 ∈ acc ∧ ¬x_1 ∈ [x])) := by
apply funext
intro x_1
simp only [decide_not, Bool.not_eq_true']
cases Decidable.em (x_1 ∈ acc) with
| inl hmem =>
simp only [hmem, decide_True, not_true_eq_false, false_and]
| inr hnmem =>
simp only [hnmem, decide_False, not_false_eq_true, true_and,
decide_not]
cases Decidable.em (x_1 ∈ [x]) with
| inl hmem' => simp only [hmem', decide_True, decide_False, not]
| inr hnmem' => simp only [hnmem', decide_True, decide_False, not]
rw [this, ←unique]
apply congrArg
apply congrArg
have h_mem_iff := mem_cons_iff_mem_singleton_or_tail x acc
have h_mem_iff_neg := (λ x => Iff.not_iff_not_of_iff $ h_mem_iff x)
apply congr _ rfl
apply congr rfl
apply funext
intros a
apply Decidable.prop_eq_of_decide_eq
rw [h_mem_iff_neg, not_or_distrib, And.comm] | α : Type u_1
inst✝ : DecidableEq α
x : α
xs acc : List α
hterm : length (filter (fun a => decide ¬a ∈ acc) xs) < Nat.succ (length xs)
hterm' : length xs < Nat.succ (length xs)
ih₁ : uniqueAux xs acc = reverse acc ++ unique (filter (fun x => decide ¬x ∈ acc) xs)
ih₂ : uniqueAux xs (x :: acc) = reverse (x :: acc) ++ unique (filter (fun x_1 => decide ¬x_1 ∈ x :: acc) xs)
ih₃ :
uniqueAux (filter (fun a => decide ¬a ∈ acc) xs) [x] =
reverse [x] ++ unique (filter (fun x_1 => decide ¬x_1 ∈ [x]) (filter (fun a => decide ¬a ∈ acc) xs))
⊢ (if x ∈ acc then uniqueAux xs acc else uniqueAux xs (x :: acc)) =
reverse acc ++
unique
(match decide ¬x ∈ acc with
| true => x :: filter (fun x => decide ¬x ∈ acc) xs
| false => filter (fun x => decide ¬x ∈ acc) xs) | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.uniqueAux_acc_append_filter | [1075, 1] | [1134, 25] | simp only [hin, ite_true, not_true_eq_false, decide_False] | case inl
α : Type u_1
inst✝ : DecidableEq α
x : α
xs acc : List α
hterm : length (filter (fun a => decide ¬a ∈ acc) xs) < Nat.succ (length xs)
hterm' : length xs < Nat.succ (length xs)
ih₁ : uniqueAux xs acc = reverse acc ++ unique (filter (fun x => decide ¬x ∈ acc) xs)
ih₂ : uniqueAux xs (x :: acc) = reverse (x :: acc) ++ unique (filter (fun x_1 => decide ¬x_1 ∈ x :: acc) xs)
ih₃ :
uniqueAux (filter (fun a => decide ¬a ∈ acc) xs) [x] =
reverse [x] ++ unique (filter (fun x_1 => decide ¬x_1 ∈ [x]) (filter (fun a => decide ¬a ∈ acc) xs))
hin : x ∈ acc
⊢ (if x ∈ acc then uniqueAux xs acc else uniqueAux xs (x :: acc)) =
reverse acc ++
unique
(match decide ¬x ∈ acc with
| true => x :: filter (fun x => decide ¬x ∈ acc) xs
| false => filter (fun x => decide ¬x ∈ acc) xs) | case inl
α : Type u_1
inst✝ : DecidableEq α
x : α
xs acc : List α
hterm : length (filter (fun a => decide ¬a ∈ acc) xs) < Nat.succ (length xs)
hterm' : length xs < Nat.succ (length xs)
ih₁ : uniqueAux xs acc = reverse acc ++ unique (filter (fun x => decide ¬x ∈ acc) xs)
ih₂ : uniqueAux xs (x :: acc) = reverse (x :: acc) ++ unique (filter (fun x_1 => decide ¬x_1 ∈ x :: acc) xs)
ih₃ :
uniqueAux (filter (fun a => decide ¬a ∈ acc) xs) [x] =
reverse [x] ++ unique (filter (fun x_1 => decide ¬x_1 ∈ [x]) (filter (fun a => decide ¬a ∈ acc) xs))
hin : x ∈ acc
⊢ uniqueAux xs acc = reverse acc ++ unique (filter (fun x => decide ¬x ∈ acc) xs) |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.uniqueAux_acc_append_filter | [1075, 1] | [1134, 25] | rw [ih₁] | case inl
α : Type u_1
inst✝ : DecidableEq α
x : α
xs acc : List α
hterm : length (filter (fun a => decide ¬a ∈ acc) xs) < Nat.succ (length xs)
hterm' : length xs < Nat.succ (length xs)
ih₁ : uniqueAux xs acc = reverse acc ++ unique (filter (fun x => decide ¬x ∈ acc) xs)
ih₂ : uniqueAux xs (x :: acc) = reverse (x :: acc) ++ unique (filter (fun x_1 => decide ¬x_1 ∈ x :: acc) xs)
ih₃ :
uniqueAux (filter (fun a => decide ¬a ∈ acc) xs) [x] =
reverse [x] ++ unique (filter (fun x_1 => decide ¬x_1 ∈ [x]) (filter (fun a => decide ¬a ∈ acc) xs))
hin : x ∈ acc
⊢ uniqueAux xs acc = reverse acc ++ unique (filter (fun x => decide ¬x ∈ acc) xs) | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.uniqueAux_acc_append_filter | [1075, 1] | [1134, 25] | simp only [hout, ite_false, not_false_eq_true, decide_True] | case inr
α : Type u_1
inst✝ : DecidableEq α
x : α
xs acc : List α
hterm : length (filter (fun a => decide ¬a ∈ acc) xs) < Nat.succ (length xs)
hterm' : length xs < Nat.succ (length xs)
ih₁ : uniqueAux xs acc = reverse acc ++ unique (filter (fun x => decide ¬x ∈ acc) xs)
ih₂ : uniqueAux xs (x :: acc) = reverse (x :: acc) ++ unique (filter (fun x_1 => decide ¬x_1 ∈ x :: acc) xs)
ih₃ :
uniqueAux (filter (fun a => decide ¬a ∈ acc) xs) [x] =
reverse [x] ++ unique (filter (fun x_1 => decide ¬x_1 ∈ [x]) (filter (fun a => decide ¬a ∈ acc) xs))
hout : ¬x ∈ acc
⊢ (if x ∈ acc then uniqueAux xs acc else uniqueAux xs (x :: acc)) =
reverse acc ++
unique
(match decide ¬x ∈ acc with
| true => x :: filter (fun x => decide ¬x ∈ acc) xs
| false => filter (fun x => decide ¬x ∈ acc) xs) | case inr
α : Type u_1
inst✝ : DecidableEq α
x : α
xs acc : List α
hterm : length (filter (fun a => decide ¬a ∈ acc) xs) < Nat.succ (length xs)
hterm' : length xs < Nat.succ (length xs)
ih₁ : uniqueAux xs acc = reverse acc ++ unique (filter (fun x => decide ¬x ∈ acc) xs)
ih₂ : uniqueAux xs (x :: acc) = reverse (x :: acc) ++ unique (filter (fun x_1 => decide ¬x_1 ∈ x :: acc) xs)
ih₃ :
uniqueAux (filter (fun a => decide ¬a ∈ acc) xs) [x] =
reverse [x] ++ unique (filter (fun x_1 => decide ¬x_1 ∈ [x]) (filter (fun a => decide ¬a ∈ acc) xs))
hout : ¬x ∈ acc
⊢ uniqueAux xs (x :: acc) = reverse acc ++ unique (x :: filter (fun x => decide ¬x ∈ acc) xs) |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.uniqueAux_acc_append_filter | [1075, 1] | [1134, 25] | simp only [reverse_singleton, singleton_append, unique,
uniqueAux, List.not_mem_nil, ite_false] | case inr
α : Type u_1
inst✝ : DecidableEq α
x : α
xs acc : List α
hterm : length (filter (fun a => decide ¬a ∈ acc) xs) < Nat.succ (length xs)
hterm' : length xs < Nat.succ (length xs)
ih₁ : uniqueAux xs acc = reverse acc ++ unique (filter (fun x => decide ¬x ∈ acc) xs)
ih₂ : uniqueAux xs (x :: acc) = reverse (x :: acc) ++ unique (filter (fun x_1 => decide ¬x_1 ∈ x :: acc) xs)
ih₃ :
uniqueAux (filter (fun a => decide ¬a ∈ acc) xs) [x] =
reverse [x] ++ unique (filter (fun x_1 => decide ¬x_1 ∈ [x]) (filter (fun a => decide ¬a ∈ acc) xs))
hout : ¬x ∈ acc
⊢ uniqueAux xs (x :: acc) = reverse acc ++ unique (x :: filter (fun x => decide ¬x ∈ acc) xs) | case inr
α : Type u_1
inst✝ : DecidableEq α
x : α
xs acc : List α
hterm : length (filter (fun a => decide ¬a ∈ acc) xs) < Nat.succ (length xs)
hterm' : length xs < Nat.succ (length xs)
ih₁ : uniqueAux xs acc = reverse acc ++ unique (filter (fun x => decide ¬x ∈ acc) xs)
ih₂ : uniqueAux xs (x :: acc) = reverse (x :: acc) ++ unique (filter (fun x_1 => decide ¬x_1 ∈ x :: acc) xs)
ih₃ :
uniqueAux (filter (fun a => decide ¬a ∈ acc) xs) [x] =
reverse [x] ++ unique (filter (fun x_1 => decide ¬x_1 ∈ [x]) (filter (fun a => decide ¬a ∈ acc) xs))
hout : ¬x ∈ acc
⊢ uniqueAux xs (x :: acc) = reverse acc ++ uniqueAux (filter (fun x => decide ¬x ∈ acc) xs) [x] |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.uniqueAux_acc_append_filter | [1075, 1] | [1134, 25] | rw [ih₂] | case inr
α : Type u_1
inst✝ : DecidableEq α
x : α
xs acc : List α
hterm : length (filter (fun a => decide ¬a ∈ acc) xs) < Nat.succ (length xs)
hterm' : length xs < Nat.succ (length xs)
ih₁ : uniqueAux xs acc = reverse acc ++ unique (filter (fun x => decide ¬x ∈ acc) xs)
ih₂ : uniqueAux xs (x :: acc) = reverse (x :: acc) ++ unique (filter (fun x_1 => decide ¬x_1 ∈ x :: acc) xs)
ih₃ :
uniqueAux (filter (fun a => decide ¬a ∈ acc) xs) [x] =
reverse [x] ++ unique (filter (fun x_1 => decide ¬x_1 ∈ [x]) (filter (fun a => decide ¬a ∈ acc) xs))
hout : ¬x ∈ acc
⊢ uniqueAux xs (x :: acc) = reverse acc ++ uniqueAux (filter (fun x => decide ¬x ∈ acc) xs) [x] | case inr
α : Type u_1
inst✝ : DecidableEq α
x : α
xs acc : List α
hterm : length (filter (fun a => decide ¬a ∈ acc) xs) < Nat.succ (length xs)
hterm' : length xs < Nat.succ (length xs)
ih₁ : uniqueAux xs acc = reverse acc ++ unique (filter (fun x => decide ¬x ∈ acc) xs)
ih₂ : uniqueAux xs (x :: acc) = reverse (x :: acc) ++ unique (filter (fun x_1 => decide ¬x_1 ∈ x :: acc) xs)
ih₃ :
uniqueAux (filter (fun a => decide ¬a ∈ acc) xs) [x] =
reverse [x] ++ unique (filter (fun x_1 => decide ¬x_1 ∈ [x]) (filter (fun a => decide ¬a ∈ acc) xs))
hout : ¬x ∈ acc
⊢ reverse (x :: acc) ++ unique (filter (fun x_1 => decide ¬x_1 ∈ x :: acc) xs) =
reverse acc ++ uniqueAux (filter (fun x => decide ¬x ∈ acc) xs) [x] |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.uniqueAux_acc_append_filter | [1075, 1] | [1134, 25] | simp only [reverse_cons, append_assoc, singleton_append] | case inr
α : Type u_1
inst✝ : DecidableEq α
x : α
xs acc : List α
hterm : length (filter (fun a => decide ¬a ∈ acc) xs) < Nat.succ (length xs)
hterm' : length xs < Nat.succ (length xs)
ih₁ : uniqueAux xs acc = reverse acc ++ unique (filter (fun x => decide ¬x ∈ acc) xs)
ih₂ : uniqueAux xs (x :: acc) = reverse (x :: acc) ++ unique (filter (fun x_1 => decide ¬x_1 ∈ x :: acc) xs)
ih₃ :
uniqueAux (filter (fun a => decide ¬a ∈ acc) xs) [x] =
reverse [x] ++ unique (filter (fun x_1 => decide ¬x_1 ∈ [x]) (filter (fun a => decide ¬a ∈ acc) xs))
hout : ¬x ∈ acc
⊢ reverse (x :: acc) ++ unique (filter (fun x_1 => decide ¬x_1 ∈ x :: acc) xs) =
reverse acc ++ uniqueAux (filter (fun x => decide ¬x ∈ acc) xs) [x] | case inr
α : Type u_1
inst✝ : DecidableEq α
x : α
xs acc : List α
hterm : length (filter (fun a => decide ¬a ∈ acc) xs) < Nat.succ (length xs)
hterm' : length xs < Nat.succ (length xs)
ih₁ : uniqueAux xs acc = reverse acc ++ unique (filter (fun x => decide ¬x ∈ acc) xs)
ih₂ : uniqueAux xs (x :: acc) = reverse (x :: acc) ++ unique (filter (fun x_1 => decide ¬x_1 ∈ x :: acc) xs)
ih₃ :
uniqueAux (filter (fun a => decide ¬a ∈ acc) xs) [x] =
reverse [x] ++ unique (filter (fun x_1 => decide ¬x_1 ∈ [x]) (filter (fun a => decide ¬a ∈ acc) xs))
hout : ¬x ∈ acc
⊢ reverse acc ++ x :: unique (filter (fun x_1 => decide ¬x_1 ∈ x :: acc) xs) =
reverse acc ++ uniqueAux (filter (fun x => decide ¬x ∈ acc) xs) [x] |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.uniqueAux_acc_append_filter | [1075, 1] | [1134, 25] | apply congrArg | case inr
α : Type u_1
inst✝ : DecidableEq α
x : α
xs acc : List α
hterm : length (filter (fun a => decide ¬a ∈ acc) xs) < Nat.succ (length xs)
hterm' : length xs < Nat.succ (length xs)
ih₁ : uniqueAux xs acc = reverse acc ++ unique (filter (fun x => decide ¬x ∈ acc) xs)
ih₂ : uniqueAux xs (x :: acc) = reverse (x :: acc) ++ unique (filter (fun x_1 => decide ¬x_1 ∈ x :: acc) xs)
ih₃ :
uniqueAux (filter (fun a => decide ¬a ∈ acc) xs) [x] =
reverse [x] ++ unique (filter (fun x_1 => decide ¬x_1 ∈ [x]) (filter (fun a => decide ¬a ∈ acc) xs))
hout : ¬x ∈ acc
⊢ reverse acc ++ x :: unique (filter (fun x_1 => decide ¬x_1 ∈ x :: acc) xs) =
reverse acc ++ uniqueAux (filter (fun x => decide ¬x ∈ acc) xs) [x] | case inr.h
α : Type u_1
inst✝ : DecidableEq α
x : α
xs acc : List α
hterm : length (filter (fun a => decide ¬a ∈ acc) xs) < Nat.succ (length xs)
hterm' : length xs < Nat.succ (length xs)
ih₁ : uniqueAux xs acc = reverse acc ++ unique (filter (fun x => decide ¬x ∈ acc) xs)
ih₂ : uniqueAux xs (x :: acc) = reverse (x :: acc) ++ unique (filter (fun x_1 => decide ¬x_1 ∈ x :: acc) xs)
ih₃ :
uniqueAux (filter (fun a => decide ¬a ∈ acc) xs) [x] =
reverse [x] ++ unique (filter (fun x_1 => decide ¬x_1 ∈ [x]) (filter (fun a => decide ¬a ∈ acc) xs))
hout : ¬x ∈ acc
⊢ x :: unique (filter (fun x_1 => decide ¬x_1 ∈ x :: acc) xs) = uniqueAux (filter (fun x => decide ¬x ∈ acc) xs) [x] |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.uniqueAux_acc_append_filter | [1075, 1] | [1134, 25] | simp only [unique] | case inr.h
α : Type u_1
inst✝ : DecidableEq α
x : α
xs acc : List α
hterm : length (filter (fun a => decide ¬a ∈ acc) xs) < Nat.succ (length xs)
hterm' : length xs < Nat.succ (length xs)
ih₁ : uniqueAux xs acc = reverse acc ++ unique (filter (fun x => decide ¬x ∈ acc) xs)
ih₂ : uniqueAux xs (x :: acc) = reverse (x :: acc) ++ unique (filter (fun x_1 => decide ¬x_1 ∈ x :: acc) xs)
ih₃ :
uniqueAux (filter (fun a => decide ¬a ∈ acc) xs) [x] =
reverse [x] ++ unique (filter (fun x_1 => decide ¬x_1 ∈ [x]) (filter (fun a => decide ¬a ∈ acc) xs))
hout : ¬x ∈ acc
⊢ x :: unique (filter (fun x_1 => decide ¬x_1 ∈ x :: acc) xs) = uniqueAux (filter (fun x => decide ¬x ∈ acc) xs) [x] | case inr.h
α : Type u_1
inst✝ : DecidableEq α
x : α
xs acc : List α
hterm : length (filter (fun a => decide ¬a ∈ acc) xs) < Nat.succ (length xs)
hterm' : length xs < Nat.succ (length xs)
ih₁ : uniqueAux xs acc = reverse acc ++ unique (filter (fun x => decide ¬x ∈ acc) xs)
ih₂ : uniqueAux xs (x :: acc) = reverse (x :: acc) ++ unique (filter (fun x_1 => decide ¬x_1 ∈ x :: acc) xs)
ih₃ :
uniqueAux (filter (fun a => decide ¬a ∈ acc) xs) [x] =
reverse [x] ++ unique (filter (fun x_1 => decide ¬x_1 ∈ [x]) (filter (fun a => decide ¬a ∈ acc) xs))
hout : ¬x ∈ acc
⊢ x :: uniqueAux (filter (fun x_1 => decide ¬x_1 ∈ x :: acc) xs) [] =
uniqueAux (filter (fun x => decide ¬x ∈ acc) xs) [x] |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.uniqueAux_acc_append_filter | [1075, 1] | [1134, 25] | rw [ih₃] | case inr.h
α : Type u_1
inst✝ : DecidableEq α
x : α
xs acc : List α
hterm : length (filter (fun a => decide ¬a ∈ acc) xs) < Nat.succ (length xs)
hterm' : length xs < Nat.succ (length xs)
ih₁ : uniqueAux xs acc = reverse acc ++ unique (filter (fun x => decide ¬x ∈ acc) xs)
ih₂ : uniqueAux xs (x :: acc) = reverse (x :: acc) ++ unique (filter (fun x_1 => decide ¬x_1 ∈ x :: acc) xs)
ih₃ :
uniqueAux (filter (fun a => decide ¬a ∈ acc) xs) [x] =
reverse [x] ++ unique (filter (fun x_1 => decide ¬x_1 ∈ [x]) (filter (fun a => decide ¬a ∈ acc) xs))
hout : ¬x ∈ acc
⊢ x :: uniqueAux (filter (fun x_1 => decide ¬x_1 ∈ x :: acc) xs) [] =
uniqueAux (filter (fun x => decide ¬x ∈ acc) xs) [x] | case inr.h
α : Type u_1
inst✝ : DecidableEq α
x : α
xs acc : List α
hterm : length (filter (fun a => decide ¬a ∈ acc) xs) < Nat.succ (length xs)
hterm' : length xs < Nat.succ (length xs)
ih₁ : uniqueAux xs acc = reverse acc ++ unique (filter (fun x => decide ¬x ∈ acc) xs)
ih₂ : uniqueAux xs (x :: acc) = reverse (x :: acc) ++ unique (filter (fun x_1 => decide ¬x_1 ∈ x :: acc) xs)
ih₃ :
uniqueAux (filter (fun a => decide ¬a ∈ acc) xs) [x] =
reverse [x] ++ unique (filter (fun x_1 => decide ¬x_1 ∈ [x]) (filter (fun a => decide ¬a ∈ acc) xs))
hout : ¬x ∈ acc
⊢ x :: uniqueAux (filter (fun x_1 => decide ¬x_1 ∈ x :: acc) xs) [] =
reverse [x] ++ unique (filter (fun x_1 => decide ¬x_1 ∈ [x]) (filter (fun a => decide ¬a ∈ acc) xs)) |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.uniqueAux_acc_append_filter | [1075, 1] | [1134, 25] | rw [reverse_singleton, singleton_append, filter_filter] | case inr.h
α : Type u_1
inst✝ : DecidableEq α
x : α
xs acc : List α
hterm : length (filter (fun a => decide ¬a ∈ acc) xs) < Nat.succ (length xs)
hterm' : length xs < Nat.succ (length xs)
ih₁ : uniqueAux xs acc = reverse acc ++ unique (filter (fun x => decide ¬x ∈ acc) xs)
ih₂ : uniqueAux xs (x :: acc) = reverse (x :: acc) ++ unique (filter (fun x_1 => decide ¬x_1 ∈ x :: acc) xs)
ih₃ :
uniqueAux (filter (fun a => decide ¬a ∈ acc) xs) [x] =
reverse [x] ++ unique (filter (fun x_1 => decide ¬x_1 ∈ [x]) (filter (fun a => decide ¬a ∈ acc) xs))
hout : ¬x ∈ acc
⊢ x :: uniqueAux (filter (fun x_1 => decide ¬x_1 ∈ x :: acc) xs) [] =
reverse [x] ++ unique (filter (fun x_1 => decide ¬x_1 ∈ [x]) (filter (fun a => decide ¬a ∈ acc) xs)) | case inr.h
α : Type u_1
inst✝ : DecidableEq α
x : α
xs acc : List α
hterm : length (filter (fun a => decide ¬a ∈ acc) xs) < Nat.succ (length xs)
hterm' : length xs < Nat.succ (length xs)
ih₁ : uniqueAux xs acc = reverse acc ++ unique (filter (fun x => decide ¬x ∈ acc) xs)
ih₂ : uniqueAux xs (x :: acc) = reverse (x :: acc) ++ unique (filter (fun x_1 => decide ¬x_1 ∈ x :: acc) xs)
ih₃ :
uniqueAux (filter (fun a => decide ¬a ∈ acc) xs) [x] =
reverse [x] ++ unique (filter (fun x_1 => decide ¬x_1 ∈ [x]) (filter (fun a => decide ¬a ∈ acc) xs))
hout : ¬x ∈ acc
⊢ x :: uniqueAux (filter (fun x_1 => decide ¬x_1 ∈ x :: acc) xs) [] =
x :: unique (filter (fun x_1 => decide ((decide ¬x_1 ∈ acc) = true ∧ (decide ¬x_1 ∈ [x]) = true)) xs) |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.uniqueAux_acc_append_filter | [1075, 1] | [1134, 25] | have : (λ x_1 => decide (
(decide ¬x_1 ∈ acc) = true ∧ (decide ¬x_1 ∈ [x]) = true)
) = (λ x_1 => decide (¬x_1 ∈ acc ∧ ¬x_1 ∈ [x])) := by
apply funext
intro x_1
simp only [decide_not, Bool.not_eq_true']
cases Decidable.em (x_1 ∈ acc) with
| inl hmem =>
simp only [hmem, decide_True, not_true_eq_false, false_and]
| inr hnmem =>
simp only [hnmem, decide_False, not_false_eq_true, true_and,
decide_not]
cases Decidable.em (x_1 ∈ [x]) with
| inl hmem' => simp only [hmem', decide_True, decide_False, not]
| inr hnmem' => simp only [hnmem', decide_True, decide_False, not] | case inr.h
α : Type u_1
inst✝ : DecidableEq α
x : α
xs acc : List α
hterm : length (filter (fun a => decide ¬a ∈ acc) xs) < Nat.succ (length xs)
hterm' : length xs < Nat.succ (length xs)
ih₁ : uniqueAux xs acc = reverse acc ++ unique (filter (fun x => decide ¬x ∈ acc) xs)
ih₂ : uniqueAux xs (x :: acc) = reverse (x :: acc) ++ unique (filter (fun x_1 => decide ¬x_1 ∈ x :: acc) xs)
ih₃ :
uniqueAux (filter (fun a => decide ¬a ∈ acc) xs) [x] =
reverse [x] ++ unique (filter (fun x_1 => decide ¬x_1 ∈ [x]) (filter (fun a => decide ¬a ∈ acc) xs))
hout : ¬x ∈ acc
⊢ x :: uniqueAux (filter (fun x_1 => decide ¬x_1 ∈ x :: acc) xs) [] =
x :: unique (filter (fun x_1 => decide ((decide ¬x_1 ∈ acc) = true ∧ (decide ¬x_1 ∈ [x]) = true)) xs) | case inr.h
α : Type u_1
inst✝ : DecidableEq α
x : α
xs acc : List α
hterm : length (filter (fun a => decide ¬a ∈ acc) xs) < Nat.succ (length xs)
hterm' : length xs < Nat.succ (length xs)
ih₁ : uniqueAux xs acc = reverse acc ++ unique (filter (fun x => decide ¬x ∈ acc) xs)
ih₂ : uniqueAux xs (x :: acc) = reverse (x :: acc) ++ unique (filter (fun x_1 => decide ¬x_1 ∈ x :: acc) xs)
ih₃ :
uniqueAux (filter (fun a => decide ¬a ∈ acc) xs) [x] =
reverse [x] ++ unique (filter (fun x_1 => decide ¬x_1 ∈ [x]) (filter (fun a => decide ¬a ∈ acc) xs))
hout : ¬x ∈ acc
this :
(fun x_1 => decide ((decide ¬x_1 ∈ acc) = true ∧ (decide ¬x_1 ∈ [x]) = true)) = fun x_1 =>
decide (¬x_1 ∈ acc ∧ ¬x_1 ∈ [x])
⊢ x :: uniqueAux (filter (fun x_1 => decide ¬x_1 ∈ x :: acc) xs) [] =
x :: unique (filter (fun x_1 => decide ((decide ¬x_1 ∈ acc) = true ∧ (decide ¬x_1 ∈ [x]) = true)) xs) |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.uniqueAux_acc_append_filter | [1075, 1] | [1134, 25] | rw [this, ←unique] | case inr.h
α : Type u_1
inst✝ : DecidableEq α
x : α
xs acc : List α
hterm : length (filter (fun a => decide ¬a ∈ acc) xs) < Nat.succ (length xs)
hterm' : length xs < Nat.succ (length xs)
ih₁ : uniqueAux xs acc = reverse acc ++ unique (filter (fun x => decide ¬x ∈ acc) xs)
ih₂ : uniqueAux xs (x :: acc) = reverse (x :: acc) ++ unique (filter (fun x_1 => decide ¬x_1 ∈ x :: acc) xs)
ih₃ :
uniqueAux (filter (fun a => decide ¬a ∈ acc) xs) [x] =
reverse [x] ++ unique (filter (fun x_1 => decide ¬x_1 ∈ [x]) (filter (fun a => decide ¬a ∈ acc) xs))
hout : ¬x ∈ acc
this :
(fun x_1 => decide ((decide ¬x_1 ∈ acc) = true ∧ (decide ¬x_1 ∈ [x]) = true)) = fun x_1 =>
decide (¬x_1 ∈ acc ∧ ¬x_1 ∈ [x])
⊢ x :: uniqueAux (filter (fun x_1 => decide ¬x_1 ∈ x :: acc) xs) [] =
x :: unique (filter (fun x_1 => decide ((decide ¬x_1 ∈ acc) = true ∧ (decide ¬x_1 ∈ [x]) = true)) xs) | case inr.h
α : Type u_1
inst✝ : DecidableEq α
x : α
xs acc : List α
hterm : length (filter (fun a => decide ¬a ∈ acc) xs) < Nat.succ (length xs)
hterm' : length xs < Nat.succ (length xs)
ih₁ : uniqueAux xs acc = reverse acc ++ unique (filter (fun x => decide ¬x ∈ acc) xs)
ih₂ : uniqueAux xs (x :: acc) = reverse (x :: acc) ++ unique (filter (fun x_1 => decide ¬x_1 ∈ x :: acc) xs)
ih₃ :
uniqueAux (filter (fun a => decide ¬a ∈ acc) xs) [x] =
reverse [x] ++ unique (filter (fun x_1 => decide ¬x_1 ∈ [x]) (filter (fun a => decide ¬a ∈ acc) xs))
hout : ¬x ∈ acc
this :
(fun x_1 => decide ((decide ¬x_1 ∈ acc) = true ∧ (decide ¬x_1 ∈ [x]) = true)) = fun x_1 =>
decide (¬x_1 ∈ acc ∧ ¬x_1 ∈ [x])
⊢ x :: unique (filter (fun x_1 => decide ¬x_1 ∈ x :: acc) xs) =
x :: unique (filter (fun x_1 => decide (¬x_1 ∈ acc ∧ ¬x_1 ∈ [x])) xs) |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.uniqueAux_acc_append_filter | [1075, 1] | [1134, 25] | apply congrArg | case inr.h
α : Type u_1
inst✝ : DecidableEq α
x : α
xs acc : List α
hterm : length (filter (fun a => decide ¬a ∈ acc) xs) < Nat.succ (length xs)
hterm' : length xs < Nat.succ (length xs)
ih₁ : uniqueAux xs acc = reverse acc ++ unique (filter (fun x => decide ¬x ∈ acc) xs)
ih₂ : uniqueAux xs (x :: acc) = reverse (x :: acc) ++ unique (filter (fun x_1 => decide ¬x_1 ∈ x :: acc) xs)
ih₃ :
uniqueAux (filter (fun a => decide ¬a ∈ acc) xs) [x] =
reverse [x] ++ unique (filter (fun x_1 => decide ¬x_1 ∈ [x]) (filter (fun a => decide ¬a ∈ acc) xs))
hout : ¬x ∈ acc
this :
(fun x_1 => decide ((decide ¬x_1 ∈ acc) = true ∧ (decide ¬x_1 ∈ [x]) = true)) = fun x_1 =>
decide (¬x_1 ∈ acc ∧ ¬x_1 ∈ [x])
⊢ x :: unique (filter (fun x_1 => decide ¬x_1 ∈ x :: acc) xs) =
x :: unique (filter (fun x_1 => decide (¬x_1 ∈ acc ∧ ¬x_1 ∈ [x])) xs) | case inr.h.h
α : Type u_1
inst✝ : DecidableEq α
x : α
xs acc : List α
hterm : length (filter (fun a => decide ¬a ∈ acc) xs) < Nat.succ (length xs)
hterm' : length xs < Nat.succ (length xs)
ih₁ : uniqueAux xs acc = reverse acc ++ unique (filter (fun x => decide ¬x ∈ acc) xs)
ih₂ : uniqueAux xs (x :: acc) = reverse (x :: acc) ++ unique (filter (fun x_1 => decide ¬x_1 ∈ x :: acc) xs)
ih₃ :
uniqueAux (filter (fun a => decide ¬a ∈ acc) xs) [x] =
reverse [x] ++ unique (filter (fun x_1 => decide ¬x_1 ∈ [x]) (filter (fun a => decide ¬a ∈ acc) xs))
hout : ¬x ∈ acc
this :
(fun x_1 => decide ((decide ¬x_1 ∈ acc) = true ∧ (decide ¬x_1 ∈ [x]) = true)) = fun x_1 =>
decide (¬x_1 ∈ acc ∧ ¬x_1 ∈ [x])
⊢ unique (filter (fun x_1 => decide ¬x_1 ∈ x :: acc) xs) =
unique (filter (fun x_1 => decide (¬x_1 ∈ acc ∧ ¬x_1 ∈ [x])) xs) |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.uniqueAux_acc_append_filter | [1075, 1] | [1134, 25] | apply congrArg | case inr.h.h
α : Type u_1
inst✝ : DecidableEq α
x : α
xs acc : List α
hterm : length (filter (fun a => decide ¬a ∈ acc) xs) < Nat.succ (length xs)
hterm' : length xs < Nat.succ (length xs)
ih₁ : uniqueAux xs acc = reverse acc ++ unique (filter (fun x => decide ¬x ∈ acc) xs)
ih₂ : uniqueAux xs (x :: acc) = reverse (x :: acc) ++ unique (filter (fun x_1 => decide ¬x_1 ∈ x :: acc) xs)
ih₃ :
uniqueAux (filter (fun a => decide ¬a ∈ acc) xs) [x] =
reverse [x] ++ unique (filter (fun x_1 => decide ¬x_1 ∈ [x]) (filter (fun a => decide ¬a ∈ acc) xs))
hout : ¬x ∈ acc
this :
(fun x_1 => decide ((decide ¬x_1 ∈ acc) = true ∧ (decide ¬x_1 ∈ [x]) = true)) = fun x_1 =>
decide (¬x_1 ∈ acc ∧ ¬x_1 ∈ [x])
⊢ unique (filter (fun x_1 => decide ¬x_1 ∈ x :: acc) xs) =
unique (filter (fun x_1 => decide (¬x_1 ∈ acc ∧ ¬x_1 ∈ [x])) xs) | case inr.h.h.h
α : Type u_1
inst✝ : DecidableEq α
x : α
xs acc : List α
hterm : length (filter (fun a => decide ¬a ∈ acc) xs) < Nat.succ (length xs)
hterm' : length xs < Nat.succ (length xs)
ih₁ : uniqueAux xs acc = reverse acc ++ unique (filter (fun x => decide ¬x ∈ acc) xs)
ih₂ : uniqueAux xs (x :: acc) = reverse (x :: acc) ++ unique (filter (fun x_1 => decide ¬x_1 ∈ x :: acc) xs)
ih₃ :
uniqueAux (filter (fun a => decide ¬a ∈ acc) xs) [x] =
reverse [x] ++ unique (filter (fun x_1 => decide ¬x_1 ∈ [x]) (filter (fun a => decide ¬a ∈ acc) xs))
hout : ¬x ∈ acc
this :
(fun x_1 => decide ((decide ¬x_1 ∈ acc) = true ∧ (decide ¬x_1 ∈ [x]) = true)) = fun x_1 =>
decide (¬x_1 ∈ acc ∧ ¬x_1 ∈ [x])
⊢ filter (fun x_1 => decide ¬x_1 ∈ x :: acc) xs = filter (fun x_1 => decide (¬x_1 ∈ acc ∧ ¬x_1 ∈ [x])) xs |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.uniqueAux_acc_append_filter | [1075, 1] | [1134, 25] | have h_mem_iff := mem_cons_iff_mem_singleton_or_tail x acc | case inr.h.h.h
α : Type u_1
inst✝ : DecidableEq α
x : α
xs acc : List α
hterm : length (filter (fun a => decide ¬a ∈ acc) xs) < Nat.succ (length xs)
hterm' : length xs < Nat.succ (length xs)
ih₁ : uniqueAux xs acc = reverse acc ++ unique (filter (fun x => decide ¬x ∈ acc) xs)
ih₂ : uniqueAux xs (x :: acc) = reverse (x :: acc) ++ unique (filter (fun x_1 => decide ¬x_1 ∈ x :: acc) xs)
ih₃ :
uniqueAux (filter (fun a => decide ¬a ∈ acc) xs) [x] =
reverse [x] ++ unique (filter (fun x_1 => decide ¬x_1 ∈ [x]) (filter (fun a => decide ¬a ∈ acc) xs))
hout : ¬x ∈ acc
this :
(fun x_1 => decide ((decide ¬x_1 ∈ acc) = true ∧ (decide ¬x_1 ∈ [x]) = true)) = fun x_1 =>
decide (¬x_1 ∈ acc ∧ ¬x_1 ∈ [x])
⊢ filter (fun x_1 => decide ¬x_1 ∈ x :: acc) xs = filter (fun x_1 => decide (¬x_1 ∈ acc ∧ ¬x_1 ∈ [x])) xs | case inr.h.h.h
α : Type u_1
inst✝ : DecidableEq α
x : α
xs acc : List α
hterm : length (filter (fun a => decide ¬a ∈ acc) xs) < Nat.succ (length xs)
hterm' : length xs < Nat.succ (length xs)
ih₁ : uniqueAux xs acc = reverse acc ++ unique (filter (fun x => decide ¬x ∈ acc) xs)
ih₂ : uniqueAux xs (x :: acc) = reverse (x :: acc) ++ unique (filter (fun x_1 => decide ¬x_1 ∈ x :: acc) xs)
ih₃ :
uniqueAux (filter (fun a => decide ¬a ∈ acc) xs) [x] =
reverse [x] ++ unique (filter (fun x_1 => decide ¬x_1 ∈ [x]) (filter (fun a => decide ¬a ∈ acc) xs))
hout : ¬x ∈ acc
this :
(fun x_1 => decide ((decide ¬x_1 ∈ acc) = true ∧ (decide ¬x_1 ∈ [x]) = true)) = fun x_1 =>
decide (¬x_1 ∈ acc ∧ ¬x_1 ∈ [x])
h_mem_iff : ∀ (x_1 : α), x_1 ∈ x :: acc ↔ x_1 ∈ [x] ∨ x_1 ∈ acc
⊢ filter (fun x_1 => decide ¬x_1 ∈ x :: acc) xs = filter (fun x_1 => decide (¬x_1 ∈ acc ∧ ¬x_1 ∈ [x])) xs |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.uniqueAux_acc_append_filter | [1075, 1] | [1134, 25] | have h_mem_iff_neg := (λ x => Iff.not_iff_not_of_iff $ h_mem_iff x) | case inr.h.h.h
α : Type u_1
inst✝ : DecidableEq α
x : α
xs acc : List α
hterm : length (filter (fun a => decide ¬a ∈ acc) xs) < Nat.succ (length xs)
hterm' : length xs < Nat.succ (length xs)
ih₁ : uniqueAux xs acc = reverse acc ++ unique (filter (fun x => decide ¬x ∈ acc) xs)
ih₂ : uniqueAux xs (x :: acc) = reverse (x :: acc) ++ unique (filter (fun x_1 => decide ¬x_1 ∈ x :: acc) xs)
ih₃ :
uniqueAux (filter (fun a => decide ¬a ∈ acc) xs) [x] =
reverse [x] ++ unique (filter (fun x_1 => decide ¬x_1 ∈ [x]) (filter (fun a => decide ¬a ∈ acc) xs))
hout : ¬x ∈ acc
this :
(fun x_1 => decide ((decide ¬x_1 ∈ acc) = true ∧ (decide ¬x_1 ∈ [x]) = true)) = fun x_1 =>
decide (¬x_1 ∈ acc ∧ ¬x_1 ∈ [x])
h_mem_iff : ∀ (x_1 : α), x_1 ∈ x :: acc ↔ x_1 ∈ [x] ∨ x_1 ∈ acc
⊢ filter (fun x_1 => decide ¬x_1 ∈ x :: acc) xs = filter (fun x_1 => decide (¬x_1 ∈ acc ∧ ¬x_1 ∈ [x])) xs | case inr.h.h.h
α : Type u_1
inst✝ : DecidableEq α
x : α
xs acc : List α
hterm : length (filter (fun a => decide ¬a ∈ acc) xs) < Nat.succ (length xs)
hterm' : length xs < Nat.succ (length xs)
ih₁ : uniqueAux xs acc = reverse acc ++ unique (filter (fun x => decide ¬x ∈ acc) xs)
ih₂ : uniqueAux xs (x :: acc) = reverse (x :: acc) ++ unique (filter (fun x_1 => decide ¬x_1 ∈ x :: acc) xs)
ih₃ :
uniqueAux (filter (fun a => decide ¬a ∈ acc) xs) [x] =
reverse [x] ++ unique (filter (fun x_1 => decide ¬x_1 ∈ [x]) (filter (fun a => decide ¬a ∈ acc) xs))
hout : ¬x ∈ acc
this :
(fun x_1 => decide ((decide ¬x_1 ∈ acc) = true ∧ (decide ¬x_1 ∈ [x]) = true)) = fun x_1 =>
decide (¬x_1 ∈ acc ∧ ¬x_1 ∈ [x])
h_mem_iff : ∀ (x_1 : α), x_1 ∈ x :: acc ↔ x_1 ∈ [x] ∨ x_1 ∈ acc
h_mem_iff_neg : ∀ (x_1 : α), ¬x_1 ∈ x :: acc ↔ ¬(x_1 ∈ [x] ∨ x_1 ∈ acc)
⊢ filter (fun x_1 => decide ¬x_1 ∈ x :: acc) xs = filter (fun x_1 => decide (¬x_1 ∈ acc ∧ ¬x_1 ∈ [x])) xs |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.uniqueAux_acc_append_filter | [1075, 1] | [1134, 25] | apply congr _ rfl | case inr.h.h.h
α : Type u_1
inst✝ : DecidableEq α
x : α
xs acc : List α
hterm : length (filter (fun a => decide ¬a ∈ acc) xs) < Nat.succ (length xs)
hterm' : length xs < Nat.succ (length xs)
ih₁ : uniqueAux xs acc = reverse acc ++ unique (filter (fun x => decide ¬x ∈ acc) xs)
ih₂ : uniqueAux xs (x :: acc) = reverse (x :: acc) ++ unique (filter (fun x_1 => decide ¬x_1 ∈ x :: acc) xs)
ih₃ :
uniqueAux (filter (fun a => decide ¬a ∈ acc) xs) [x] =
reverse [x] ++ unique (filter (fun x_1 => decide ¬x_1 ∈ [x]) (filter (fun a => decide ¬a ∈ acc) xs))
hout : ¬x ∈ acc
this :
(fun x_1 => decide ((decide ¬x_1 ∈ acc) = true ∧ (decide ¬x_1 ∈ [x]) = true)) = fun x_1 =>
decide (¬x_1 ∈ acc ∧ ¬x_1 ∈ [x])
h_mem_iff : ∀ (x_1 : α), x_1 ∈ x :: acc ↔ x_1 ∈ [x] ∨ x_1 ∈ acc
h_mem_iff_neg : ∀ (x_1 : α), ¬x_1 ∈ x :: acc ↔ ¬(x_1 ∈ [x] ∨ x_1 ∈ acc)
⊢ filter (fun x_1 => decide ¬x_1 ∈ x :: acc) xs = filter (fun x_1 => decide (¬x_1 ∈ acc ∧ ¬x_1 ∈ [x])) xs | α : Type u_1
inst✝ : DecidableEq α
x : α
xs acc : List α
hterm : length (filter (fun a => decide ¬a ∈ acc) xs) < Nat.succ (length xs)
hterm' : length xs < Nat.succ (length xs)
ih₁ : uniqueAux xs acc = reverse acc ++ unique (filter (fun x => decide ¬x ∈ acc) xs)
ih₂ : uniqueAux xs (x :: acc) = reverse (x :: acc) ++ unique (filter (fun x_1 => decide ¬x_1 ∈ x :: acc) xs)
ih₃ :
uniqueAux (filter (fun a => decide ¬a ∈ acc) xs) [x] =
reverse [x] ++ unique (filter (fun x_1 => decide ¬x_1 ∈ [x]) (filter (fun a => decide ¬a ∈ acc) xs))
hout : ¬x ∈ acc
this :
(fun x_1 => decide ((decide ¬x_1 ∈ acc) = true ∧ (decide ¬x_1 ∈ [x]) = true)) = fun x_1 =>
decide (¬x_1 ∈ acc ∧ ¬x_1 ∈ [x])
h_mem_iff : ∀ (x_1 : α), x_1 ∈ x :: acc ↔ x_1 ∈ [x] ∨ x_1 ∈ acc
h_mem_iff_neg : ∀ (x_1 : α), ¬x_1 ∈ x :: acc ↔ ¬(x_1 ∈ [x] ∨ x_1 ∈ acc)
⊢ (filter fun x_1 => decide ¬x_1 ∈ x :: acc) = fun xs => filter (fun x_1 => decide (¬x_1 ∈ acc ∧ ¬x_1 ∈ [x])) xs |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/BuiltinExtensions.lean | List.uniqueAux_acc_append_filter | [1075, 1] | [1134, 25] | apply congr rfl | α : Type u_1
inst✝ : DecidableEq α
x : α
xs acc : List α
hterm : length (filter (fun a => decide ¬a ∈ acc) xs) < Nat.succ (length xs)
hterm' : length xs < Nat.succ (length xs)
ih₁ : uniqueAux xs acc = reverse acc ++ unique (filter (fun x => decide ¬x ∈ acc) xs)
ih₂ : uniqueAux xs (x :: acc) = reverse (x :: acc) ++ unique (filter (fun x_1 => decide ¬x_1 ∈ x :: acc) xs)
ih₃ :
uniqueAux (filter (fun a => decide ¬a ∈ acc) xs) [x] =
reverse [x] ++ unique (filter (fun x_1 => decide ¬x_1 ∈ [x]) (filter (fun a => decide ¬a ∈ acc) xs))
hout : ¬x ∈ acc
this :
(fun x_1 => decide ((decide ¬x_1 ∈ acc) = true ∧ (decide ¬x_1 ∈ [x]) = true)) = fun x_1 =>
decide (¬x_1 ∈ acc ∧ ¬x_1 ∈ [x])
h_mem_iff : ∀ (x_1 : α), x_1 ∈ x :: acc ↔ x_1 ∈ [x] ∨ x_1 ∈ acc
h_mem_iff_neg : ∀ (x_1 : α), ¬x_1 ∈ x :: acc ↔ ¬(x_1 ∈ [x] ∨ x_1 ∈ acc)
⊢ (filter fun x_1 => decide ¬x_1 ∈ x :: acc) = fun xs => filter (fun x_1 => decide (¬x_1 ∈ acc ∧ ¬x_1 ∈ [x])) xs | α : Type u_1
inst✝ : DecidableEq α
x : α
xs acc : List α
hterm : length (filter (fun a => decide ¬a ∈ acc) xs) < Nat.succ (length xs)
hterm' : length xs < Nat.succ (length xs)
ih₁ : uniqueAux xs acc = reverse acc ++ unique (filter (fun x => decide ¬x ∈ acc) xs)
ih₂ : uniqueAux xs (x :: acc) = reverse (x :: acc) ++ unique (filter (fun x_1 => decide ¬x_1 ∈ x :: acc) xs)
ih₃ :
uniqueAux (filter (fun a => decide ¬a ∈ acc) xs) [x] =
reverse [x] ++ unique (filter (fun x_1 => decide ¬x_1 ∈ [x]) (filter (fun a => decide ¬a ∈ acc) xs))
hout : ¬x ∈ acc
this :
(fun x_1 => decide ((decide ¬x_1 ∈ acc) = true ∧ (decide ¬x_1 ∈ [x]) = true)) = fun x_1 =>
decide (¬x_1 ∈ acc ∧ ¬x_1 ∈ [x])
h_mem_iff : ∀ (x_1 : α), x_1 ∈ x :: acc ↔ x_1 ∈ [x] ∨ x_1 ∈ acc
h_mem_iff_neg : ∀ (x_1 : α), ¬x_1 ∈ x :: acc ↔ ¬(x_1 ∈ [x] ∨ x_1 ∈ acc)
⊢ (fun x_1 => decide ¬x_1 ∈ x :: acc) = fun x_1 => decide (¬x_1 ∈ acc ∧ ¬x_1 ∈ [x]) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.