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/Proofs.lean
sortByColumns_spec1
[582, 1]
[593, 43]
rw [←h]
case a η : Type u_η dec_η : DecidableEq η sch : Schema t : Table sch hs : List ((h : Header) × Schema.HasCol h sch × Ord h.snd) x : (h : Header) × Schema.HasCol h sch × Ord h.snd acc : Table sch h : nrows acc = nrows t ⊢ nrows (tsort acc x.fst.fst true) = nrows t
case a η : Type u_η dec_η : DecidableEq η sch : Schema t : Table sch hs : List ((h : Header) × Schema.HasCol h sch × Ord h.snd) x : (h : Header) × Schema.HasCol h sch × Ord h.snd acc : Table sch h : nrows acc = nrows t ⊢ nrows (tsort acc x.fst.fst true) = nrows acc
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
sortByColumns_spec1
[582, 1]
[593, 43]
apply tsort_spec1 (inst := x.snd.snd)
case a η : Type u_η dec_η : DecidableEq η sch : Schema t : Table sch hs : List ((h : Header) × Schema.HasCol h sch × Ord h.snd) x : (h : Header) × Schema.HasCol h sch × Ord h.snd acc : Table sch h : nrows acc = nrows t ⊢ nrows (tsort acc x.fst.fst true) = nrows acc
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
orderBy_spec3
[609, 1]
[615, 43]
intro t _
η : Type u_η dec_η : DecidableEq η sch : Schema ⊢ ∀ (t : Table sch) (cmps : List ((κ : Type u) × (Row sch → κ) × (κ → κ → Bool))), nrows (orderBy t cmps) = nrows t
η : Type u_η dec_η : DecidableEq η sch : Schema t : Table sch cmps✝ : List ((κ : Type u) × (Row sch → κ) × (κ → κ → Bool)) ⊢ nrows (orderBy t cmps✝) = nrows t
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
orderBy_spec3
[609, 1]
[615, 43]
simp only [nrows, orderBy, Schema.length_eq_List_length]
η : Type u_η dec_η : DecidableEq η sch : Schema t : Table sch cmps✝ : List ((κ : Type u) × (Row sch → κ) × (κ → κ → Bool)) ⊢ nrows (orderBy t cmps✝) = nrows t
η : Type u_η dec_η : DecidableEq η sch : Schema t : Table sch cmps✝ : List ((κ : Type u) × (Row sch → κ) × (κ → κ → Bool)) ⊢ List.length (List.mergeSortWith (fun r₁ r₂ => match List.find? (fun x => !Prod.snd x.2 (Prod.fst x.2 r₁) (Prod.fst x.2 r₂)) cmps✝ with | none => Ordering.lt | x => Ordering.gt) t.rows) = List.length t.rows
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
orderBy_spec3
[609, 1]
[615, 43]
exact List.length_mergeSortWith _ t.rows
η : Type u_η dec_η : DecidableEq η sch : Schema t : Table sch cmps✝ : List ((κ : Type u) × (Row sch → κ) × (κ → κ → Bool)) ⊢ List.length (List.mergeSortWith (fun r₁ r₂ => match List.find? (fun x => !Prod.snd x.2 (Prod.fst x.2 r₁) (Prod.fst x.2 r₂)) cmps✝ with | none => Ordering.lt | x => Ordering.gt) t.rows) = List.length t.rows
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
count_spec4
[647, 1]
[652, 68]
intro t c hc
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type inst✝ : DecidableEq τ ⊢ ∀ (t : Table sch) (c : η) (hc : Schema.HasCol (c, τ) sch), nrows (count t c) = List.length (List.unique (getColumn2 t c))
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type inst✝ : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch ⊢ nrows (count t c) = List.length (List.unique (getColumn2 t c))
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
count_spec4
[647, 1]
[652, 68]
simp only [nrows, count, Schema.length_eq_List_length]
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type inst✝ : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch ⊢ nrows (count t c) = List.length (List.unique (getColumn2 t c))
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type inst✝ : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch ⊢ List.length (count.pairsToRow (List.counts (getColumn2 t c))) = List.length (List.unique (getColumn2 t c))
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
count_spec4
[647, 1]
[652, 68]
exact Eq.trans (length_count_pairsToRow _) (List.length_counts _)
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type inst✝ : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch ⊢ List.length (count.pairsToRow (List.counts (getColumn2 t c))) = List.length (List.unique (getColumn2 t c))
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
pivotTable_spec2
[688, 1]
[700, 65]
intro t cs inst aggs
η : Type u_η dec_η : DecidableEq η sch : Schema ⊢ ∀ (t : Table sch) (cs : List (CertifiedHeader sch)) [inst : DecidableEq (Row (Schema.fromCHeaders cs))] (aggs : List ((c' : Header) × (c : CertifiedHeader sch) × (List (Option c.fst.snd) → Option c'.snd))), header (pivotTable t cs aggs) = List.append (List.map (fun x => x.fst.fst) cs) (List.map (fun x => x.fst.fst) aggs)
η : Type u_η dec_η : DecidableEq η sch : Schema t : Table sch cs : List (CertifiedHeader sch) inst : DecidableEq (Row (Schema.fromCHeaders cs)) aggs : List ((c' : Header) × (c : CertifiedHeader sch) × (List (Option c.fst.snd) → Option c'.snd)) ⊢ header (pivotTable t cs aggs) = List.append (List.map (fun x => x.fst.fst) cs) (List.map (fun x => x.fst.fst) aggs)
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
pivotTable_spec2
[688, 1]
[700, 65]
simp only [header, Schema.names, Schema.fromCHeaders, Schema.append_eq_List_append, Schema.map_eq_List_map]
η : Type u_η dec_η : DecidableEq η sch : Schema t : Table sch cs : List (CertifiedHeader sch) inst : DecidableEq (Row (Schema.fromCHeaders cs)) aggs : List ((c' : Header) × (c : CertifiedHeader sch) × (List (Option c.fst.snd) → Option c'.snd)) ⊢ header (pivotTable t cs aggs) = List.append (List.map (fun x => x.fst.fst) cs) (List.map (fun x => x.fst.fst) aggs)
η : Type u_η dec_η : DecidableEq η sch : Schema t : Table sch cs : List (CertifiedHeader sch) inst : DecidableEq (Row (Schema.fromCHeaders cs)) aggs : List ((c' : Header) × (c : CertifiedHeader sch) × (List (Option c.fst.snd) → Option c'.snd)) ⊢ List.map Prod.fst (List.append (List.map Sigma.fst cs) (List.map (fun x => x.fst) aggs)) = List.append (List.map (fun x => x.fst.fst) cs) (List.map (fun x => x.fst.fst) aggs)
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
pivotTable_spec2
[688, 1]
[700, 65]
exact List.map_map_append cs aggs Prod.fst Sigma.fst Sigma.fst
η : Type u_η dec_η : DecidableEq η sch : Schema t : Table sch cs : List (CertifiedHeader sch) inst : DecidableEq (Row (Schema.fromCHeaders cs)) aggs : List ((c' : Header) × (c : CertifiedHeader sch) × (List (Option c.fst.snd) → Option c'.snd)) ⊢ List.map Prod.fst (List.append (List.map Sigma.fst cs) (List.map (fun x => x.fst) aggs)) = List.append (List.map (fun x => x.fst.fst) cs) (List.map (fun x => x.fst.fst) aggs)
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
pivotTable_spec3_aux
[702, 1]
[720, 45]
simp only [Schema.fromCHeaders, List.map, List.append, Schema.hasNameOfAppend]
η : Type u_η dec_η : DecidableEq η sch : Schema nm : η τ : Type u_1 snd✝ : Schema.HasCol (nm, τ) sch cs : List (CertifiedHeader sch) aggs : List ((c' : Header) × (c : CertifiedHeader sch) × (List (Option c.fst.snd) → Option c'.snd)) ⊢ Schema.lookup (Schema.append (Schema.fromCHeaders ({ fst := (nm, τ), snd := snd✝ } :: cs)) (Schema.map (fun x => x.fst) aggs)) { fst := { fst := nm, snd := Schema.HasName.hd }.fst, snd := Schema.hasNameOfAppend { fst := nm, snd := Schema.HasName.hd }.snd } = Schema.lookup sch { fst := { fst := nm, snd := Schema.HasName.hd }.fst, snd := Schema.hasNameOfFromCHeaders { fst := nm, snd := Schema.HasName.hd }.snd }
η : Type u_η dec_η : DecidableEq η sch : Schema nm : η τ : Type u_1 snd✝ : Schema.HasCol (nm, τ) sch cs : List (CertifiedHeader sch) aggs : List ((c' : Header) × (c : CertifiedHeader sch) × (List (Option c.fst.snd) → Option c'.snd)) ⊢ Schema.lookup (Schema.append (Schema.map Sigma.fst ({ fst := (nm, τ), snd := snd✝ } :: cs)) (Schema.map (fun x => x.fst) aggs)) { fst := nm, snd := Schema.HasName.hd } = Schema.lookup sch { fst := nm, snd := Schema.hasNameOfFromCHeaders Schema.HasName.hd }
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
pivotTable_spec3_aux
[702, 1]
[720, 45]
rw [Schema.lookup_eq_1, Schema.hasNameOfFromCHeaders_eq_1, Schema.lookup_of_colImpliesName]
η : Type u_η dec_η : DecidableEq η sch : Schema nm : η τ : Type u_1 snd✝ : Schema.HasCol (nm, τ) sch cs : List (CertifiedHeader sch) aggs : List ((c' : Header) × (c : CertifiedHeader sch) × (List (Option c.fst.snd) → Option c'.snd)) ⊢ Schema.lookup (Schema.append (Schema.map Sigma.fst ({ fst := (nm, τ), snd := snd✝ } :: cs)) (Schema.map (fun x => x.fst) aggs)) { fst := nm, snd := Schema.HasName.hd } = Schema.lookup sch { fst := nm, snd := Schema.hasNameOfFromCHeaders Schema.HasName.hd }
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
pivotTable_spec3_aux
[702, 1]
[720, 45]
simp only [Schema.fromCHeaders, List.map, List.append, Schema.hasNameOfAppend]
η : Type u_η dec_η : DecidableEq η sch : Schema fst✝ : Header snd✝ : Schema.HasCol fst✝ sch cs : List (CertifiedHeader sch) aggs : List ((c' : Header) × (c : CertifiedHeader sch) × (List (Option c.fst.snd) → Option c'.snd)) nm : η a✝ : Schema.HasName nm (Schema.map Sigma.fst cs) ⊢ Schema.lookup (Schema.append (Schema.fromCHeaders ({ fst := fst✝, snd := snd✝ } :: cs)) (Schema.map (fun x => x.fst) aggs)) { fst := { fst := nm, snd := Schema.HasName.tl a✝ }.fst, snd := Schema.hasNameOfAppend { fst := nm, snd := Schema.HasName.tl a✝ }.snd } = Schema.lookup sch { fst := { fst := nm, snd := Schema.HasName.tl a✝ }.fst, snd := Schema.hasNameOfFromCHeaders { fst := nm, snd := Schema.HasName.tl a✝ }.snd }
η : Type u_η dec_η : DecidableEq η sch : Schema fst✝ : Header snd✝ : Schema.HasCol fst✝ sch cs : List (CertifiedHeader sch) aggs : List ((c' : Header) × (c : CertifiedHeader sch) × (List (Option c.fst.snd) → Option c'.snd)) nm : η a✝ : Schema.HasName nm (Schema.map Sigma.fst cs) ⊢ Schema.lookup (Schema.append (Schema.map Sigma.fst ({ fst := fst✝, snd := snd✝ } :: cs)) (Schema.map (fun x => x.fst) aggs)) { fst := nm, snd := Schema.HasName.tl (Schema.hasNameOfAppend a✝) } = Schema.lookup sch { fst := nm, snd := Schema.hasNameOfFromCHeaders (Schema.HasName.tl a✝) }
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
pivotTable_spec3_aux
[702, 1]
[720, 45]
rw [Schema.lookup_eq_2, Schema.hasNameOfFromCHeaders_eq_2]
η : Type u_η dec_η : DecidableEq η sch : Schema fst✝ : Header snd✝ : Schema.HasCol fst✝ sch cs : List (CertifiedHeader sch) aggs : List ((c' : Header) × (c : CertifiedHeader sch) × (List (Option c.fst.snd) → Option c'.snd)) nm : η a✝ : Schema.HasName nm (Schema.map Sigma.fst cs) ⊢ Schema.lookup (Schema.append (Schema.map Sigma.fst ({ fst := fst✝, snd := snd✝ } :: cs)) (Schema.map (fun x => x.fst) aggs)) { fst := nm, snd := Schema.HasName.tl (Schema.hasNameOfAppend a✝) } = Schema.lookup sch { fst := nm, snd := Schema.hasNameOfFromCHeaders (Schema.HasName.tl a✝) }
η : Type u_η dec_η : DecidableEq η sch : Schema fst✝ : Header snd✝ : Schema.HasCol fst✝ sch cs : List (CertifiedHeader sch) aggs : List ((c' : Header) × (c : CertifiedHeader sch) × (List (Option c.fst.snd) → Option c'.snd)) nm : η a✝ : Schema.HasName nm (Schema.map Sigma.fst cs) ⊢ Schema.lookup (Schema.append (Schema.map Sigma.fst cs) (Schema.map (fun x => x.fst) aggs)) { fst := nm, snd := Schema.hasNameOfAppend a✝ } = Schema.lookup sch { fst := nm, snd := Schema.hasNameOfFromCHeaders a✝ }
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
pivotTable_spec3_aux
[702, 1]
[720, 45]
apply pivotTable_spec3_aux cs aggs ⟨nm, _⟩
η : Type u_η dec_η : DecidableEq η sch : Schema fst✝ : Header snd✝ : Schema.HasCol fst✝ sch cs : List (CertifiedHeader sch) aggs : List ((c' : Header) × (c : CertifiedHeader sch) × (List (Option c.fst.snd) → Option c'.snd)) nm : η a✝ : Schema.HasName nm (Schema.map Sigma.fst cs) ⊢ Schema.lookup (Schema.append (Schema.map Sigma.fst cs) (Schema.map (fun x => x.fst) aggs)) { fst := nm, snd := Schema.hasNameOfAppend a✝ } = Schema.lookup sch { fst := nm, snd := Schema.hasNameOfFromCHeaders a✝ }
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
groupBy_spec4
[752, 1]
[768, 13]
intros t key proj agg
η : Type u_η dec_η : DecidableEq η sch : Schema η' : Type u_1 inst✝¹ : DecidableEq η' sch' : Schema κ : Type u_3 ν : Type u_4 inst✝ : DecidableEq κ ⊢ ∀ (t : Table sch) (key : Row sch → κ) (project : Row sch → ν) (aggregate : κ → List ν → Row sch'), nrows (groupBy t key project aggregate) = List.length (List.unique (List.map key t.rows))
η : Type u_η dec_η : DecidableEq η sch : Schema η' : Type u_1 inst✝¹ : DecidableEq η' sch' : Schema κ : Type u_3 ν : Type u_4 inst✝ : DecidableEq κ t : Table sch key : Row sch → κ proj : Row sch → ν agg : κ → List ν → Row sch' ⊢ nrows (groupBy t key proj agg) = List.length (List.unique (List.map key t.rows))
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
groupBy_spec4
[752, 1]
[768, 13]
simp only [nrows, groupBy, Schema.length_eq_List_length]
η : Type u_η dec_η : DecidableEq η sch : Schema η' : Type u_1 inst✝¹ : DecidableEq η' sch' : Schema κ : Type u_3 ν : Type u_4 inst✝ : DecidableEq κ t : Table sch key : Row sch → κ proj : Row sch → ν agg : κ → List ν → Row sch' ⊢ nrows (groupBy t key proj agg) = List.length (List.unique (List.map key t.rows))
η : Type u_η dec_η : DecidableEq η sch : Schema η' : Type u_1 inst✝¹ : DecidableEq η' sch' : Schema κ : Type u_3 ν : Type u_4 inst✝ : DecidableEq κ t : Table sch key : Row sch → κ proj : Row sch → ν agg : κ → List ν → Row sch' ⊢ List.length (List.map (fun klv => agg klv.fst klv.snd) (List.groupByKey (List.map (fun r => (key r, proj r)) t.rows))) = List.length (List.unique (List.map key t.rows))
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
groupBy_spec4
[752, 1]
[768, 13]
rw [List.length_map, List.length_groupByKey]
η : Type u_η dec_η : DecidableEq η sch : Schema η' : Type u_1 inst✝¹ : DecidableEq η' sch' : Schema κ : Type u_3 ν : Type u_4 inst✝ : DecidableEq κ t : Table sch key : Row sch → κ proj : Row sch → ν agg : κ → List ν → Row sch' ⊢ List.length (List.map (fun klv => agg klv.fst klv.snd) (List.groupByKey (List.map (fun r => (key r, proj r)) t.rows))) = List.length (List.unique (List.map key t.rows))
η : Type u_η dec_η : DecidableEq η sch : Schema η' : Type u_1 inst✝¹ : DecidableEq η' sch' : Schema κ : Type u_3 ν : Type u_4 inst✝ : DecidableEq κ t : Table sch key : Row sch → κ proj : Row sch → ν agg : κ → List ν → Row sch' ⊢ List.length (List.unique (List.map Prod.fst (List.map (fun r => (key r, proj r)) t.rows))) = List.length (List.unique (List.map key t.rows))
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
groupBy_spec4
[752, 1]
[768, 13]
apply congrArg
η : Type u_η dec_η : DecidableEq η sch : Schema η' : Type u_1 inst✝¹ : DecidableEq η' sch' : Schema κ : Type u_3 ν : Type u_4 inst✝ : DecidableEq κ t : Table sch key : Row sch → κ proj : Row sch → ν agg : κ → List ν → Row sch' ⊢ List.length (List.unique (List.map Prod.fst (List.map (fun r => (key r, proj r)) t.rows))) = List.length (List.unique (List.map key t.rows))
case h η : Type u_η dec_η : DecidableEq η sch : Schema η' : Type u_1 inst✝¹ : DecidableEq η' sch' : Schema κ : Type u_3 ν : Type u_4 inst✝ : DecidableEq κ t : Table sch key : Row sch → κ proj : Row sch → ν agg : κ → List ν → Row sch' ⊢ List.unique (List.map Prod.fst (List.map (fun r => (key r, proj r)) t.rows)) = List.unique (List.map key t.rows)
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
groupBy_spec4
[752, 1]
[768, 13]
apply congrArg
case h η : Type u_η dec_η : DecidableEq η sch : Schema η' : Type u_1 inst✝¹ : DecidableEq η' sch' : Schema κ : Type u_3 ν : Type u_4 inst✝ : DecidableEq κ t : Table sch key : Row sch → κ proj : Row sch → ν agg : κ → List ν → Row sch' ⊢ List.unique (List.map Prod.fst (List.map (fun r => (key r, proj r)) t.rows)) = List.unique (List.map key t.rows)
case h.h η : Type u_η dec_η : DecidableEq η sch : Schema η' : Type u_1 inst✝¹ : DecidableEq η' sch' : Schema κ : Type u_3 ν : Type u_4 inst✝ : DecidableEq κ t : Table sch key : Row sch → κ proj : Row sch → ν agg : κ → List ν → Row sch' ⊢ List.map Prod.fst (List.map (fun r => (key r, proj r)) t.rows) = List.map key t.rows
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
groupBy_spec4
[752, 1]
[768, 13]
rw [List.map_map]
case h.h η : Type u_η dec_η : DecidableEq η sch : Schema η' : Type u_1 inst✝¹ : DecidableEq η' sch' : Schema κ : Type u_3 ν : Type u_4 inst✝ : DecidableEq κ t : Table sch key : Row sch → κ proj : Row sch → ν agg : κ → List ν → Row sch' ⊢ List.map Prod.fst (List.map (fun r => (key r, proj r)) t.rows) = List.map key t.rows
case h.h η : Type u_η dec_η : DecidableEq η sch : Schema η' : Type u_1 inst✝¹ : DecidableEq η' sch' : Schema κ : Type u_3 ν : Type u_4 inst✝ : DecidableEq κ t : Table sch key : Row sch → κ proj : Row sch → ν agg : κ → List ν → Row sch' ⊢ List.map (Prod.fst ∘ fun r => (key r, proj r)) t.rows = List.map key t.rows
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
groupBy_spec4
[752, 1]
[768, 13]
apply congr _ rfl
case h.h η : Type u_η dec_η : DecidableEq η sch : Schema η' : Type u_1 inst✝¹ : DecidableEq η' sch' : Schema κ : Type u_3 ν : Type u_4 inst✝ : DecidableEq κ t : Table sch key : Row sch → κ proj : Row sch → ν agg : κ → List ν → Row sch' ⊢ List.map (Prod.fst ∘ fun r => (key r, proj r)) t.rows = List.map key t.rows
η : Type u_η dec_η : DecidableEq η sch : Schema η' : Type u_1 inst✝¹ : DecidableEq η' sch' : Schema κ : Type u_3 ν : Type u_4 inst✝ : DecidableEq κ t : Table sch key : Row sch → κ proj : Row sch → ν agg : κ → List ν → Row sch' ⊢ List.map (Prod.fst ∘ fun r => (key r, proj r)) = List.map key
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
groupBy_spec4
[752, 1]
[768, 13]
apply congrArg
η : Type u_η dec_η : DecidableEq η sch : Schema η' : Type u_1 inst✝¹ : DecidableEq η' sch' : Schema κ : Type u_3 ν : Type u_4 inst✝ : DecidableEq κ t : Table sch key : Row sch → κ proj : Row sch → ν agg : κ → List ν → Row sch' ⊢ List.map (Prod.fst ∘ fun r => (key r, proj r)) = List.map key
case h η : Type u_η dec_η : DecidableEq η sch : Schema η' : Type u_1 inst✝¹ : DecidableEq η' sch' : Schema κ : Type u_3 ν : Type u_4 inst✝ : DecidableEq κ t : Table sch key : Row sch → κ proj : Row sch → ν agg : κ → List ν → Row sch' ⊢ (Prod.fst ∘ fun r => (key r, proj r)) = key
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
groupBy_spec4
[752, 1]
[768, 13]
unfold Function.comp
case h η : Type u_η dec_η : DecidableEq η sch : Schema η' : Type u_1 inst✝¹ : DecidableEq η' sch' : Schema κ : Type u_3 ν : Type u_4 inst✝ : DecidableEq κ t : Table sch key : Row sch → κ proj : Row sch → ν agg : κ → List ν → Row sch' ⊢ (Prod.fst ∘ fun r => (key r, proj r)) = key
case h η : Type u_η dec_η : DecidableEq η sch : Schema η' : Type u_1 inst✝¹ : DecidableEq η' sch' : Schema κ : Type u_3 ν : Type u_4 inst✝ : DecidableEq κ t : Table sch key : Row sch → κ proj : Row sch → ν agg : κ → List ν → Row sch' ⊢ (fun x => ((fun r => (key r, proj r)) x).fst) = key
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
groupBy_spec4
[752, 1]
[768, 13]
simp only
case h η : Type u_η dec_η : DecidableEq η sch : Schema η' : Type u_1 inst✝¹ : DecidableEq η' sch' : Schema κ : Type u_3 ν : Type u_4 inst✝ : DecidableEq κ t : Table sch key : Row sch → κ proj : Row sch → ν agg : κ → List ν → Row sch' ⊢ (fun x => ((fun r => (key r, proj r)) x).fst) = key
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
completeCases_spec
[772, 1]
[777, 61]
simp only [nrows, Schema.length_eq_List_length]
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u t : Table sch c : η hc : Schema.HasCol (c, τ) sch ⊢ List.length (completeCases t c) = nrows t
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u t : Table sch c : η hc : Schema.HasCol (c, τ) sch ⊢ List.length (completeCases t c) = List.length t.rows
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
completeCases_spec
[772, 1]
[777, 61]
exact Eq.trans (List.length_map _ _) (List.length_map _ _)
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u t : Table sch c : η hc : Schema.HasCol (c, τ) sch ⊢ List.length (completeCases t c) = List.length t.rows
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
fillna_spec2
[794, 1]
[802, 24]
intros
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u ⊢ ∀ (t : Table sch) (c : η) (v : τ) (hc : Schema.HasCol (c, τ) sch), nrows (fillna t c v) = nrows t
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u t✝ : Table sch c✝ : η v✝ : τ hc✝ : Schema.HasCol (c✝, τ) sch ⊢ nrows (fillna t✝ c✝ v✝) = nrows t✝
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
fillna_spec2
[794, 1]
[802, 24]
simp only [nrows, fillna, Schema.length_eq_List_length]
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u t✝ : Table sch c✝ : η v✝ : τ hc✝ : Schema.HasCol (c✝, τ) sch ⊢ nrows (fillna t✝ c✝ v✝) = nrows t✝
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u t✝ : Table sch c✝ : η v✝ : τ hc✝ : Schema.HasCol (c✝, τ) sch ⊢ List.length (updateWithoutRetyping [{ fst := (c✝, τ), snd := hc✝ }] t✝ fun r => match Row.getCell r hc✝ with | Cell.emp => Row.singleValue v✝ | Cell.val vOld => Row.singleValue vOld).rows = List.length t✝.rows
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
fillna_spec2
[794, 1]
[802, 24]
apply List.length_map
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u t✝ : Table sch c✝ : η v✝ : τ hc✝ : Schema.HasCol (c✝, τ) sch ⊢ List.length (updateWithoutRetyping [{ fst := (c✝, τ), snd := hc✝ }] t✝ fun r => match Row.getCell r hc✝ with | Cell.emp => Row.singleValue v✝ | Cell.val vOld => Row.singleValue vOld).rows = List.length t✝.rows
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
pivotLonger_spec1
[807, 1]
[818, 6]
simp only [header, Schema.names]
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_η t : Table sch cs : ActionList (Schema.removeTypedName τ) sch c1 c2 : η ⊢ header (pivotLonger t cs c1 c2) = Schema.names (Schema.removeTypedNames sch cs) ++ [c1, c2]
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_η t : Table sch cs : ActionList (Schema.removeTypedName τ) sch c1 c2 : η ⊢ List.map Prod.fst (Schema.append (Schema.removeTypedNames sch cs) [(c1, η), (c2, τ)]) = List.map Prod.fst (Schema.removeTypedNames sch cs) ++ [c1, c2]
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
pivotLonger_spec1
[807, 1]
[818, 6]
rw [Schema.append_eq_List_append]
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_η t : Table sch cs : ActionList (Schema.removeTypedName τ) sch c1 c2 : η ⊢ List.map Prod.fst (Schema.append (Schema.removeTypedNames sch cs) [(c1, η), (c2, τ)]) = List.map Prod.fst (Schema.removeTypedNames sch cs) ++ [c1, c2]
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_η t : Table sch cs : ActionList (Schema.removeTypedName τ) sch c1 c2 : η ⊢ List.map Prod.fst (List.append (Schema.removeTypedNames sch cs) [(c1, η), (c2, τ)]) = List.map Prod.fst (Schema.removeTypedNames sch cs) ++ [c1, c2]
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
pivotLonger_spec1
[807, 1]
[818, 6]
have := List.map_append Prod.fst (sch.removeTypedNames cs) [(c1, η), (c2, τ)]
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_η t : Table sch cs : ActionList (Schema.removeTypedName τ) sch c1 c2 : η ⊢ List.map Prod.fst (List.append (Schema.removeTypedNames sch cs) [(c1, η), (c2, τ)]) = List.map Prod.fst (Schema.removeTypedNames sch cs) ++ [c1, c2]
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_η t : Table sch cs : ActionList (Schema.removeTypedName τ) sch c1 c2 : η this : List.map Prod.fst (Schema.removeTypedNames sch cs ++ [(c1, η), (c2, τ)]) = List.map Prod.fst (Schema.removeTypedNames sch cs) ++ List.map Prod.fst [(c1, η), (c2, τ)] ⊢ List.map Prod.fst (List.append (Schema.removeTypedNames sch cs) [(c1, η), (c2, τ)]) = List.map Prod.fst (Schema.removeTypedNames sch cs) ++ [c1, c2]
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
pivotLonger_spec1
[807, 1]
[818, 6]
simp only [HAppend.hAppend, Append.append] at this
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_η t : Table sch cs : ActionList (Schema.removeTypedName τ) sch c1 c2 : η this : List.map Prod.fst (Schema.removeTypedNames sch cs ++ [(c1, η), (c2, τ)]) = List.map Prod.fst (Schema.removeTypedNames sch cs) ++ List.map Prod.fst [(c1, η), (c2, τ)] ⊢ List.map Prod.fst (List.append (Schema.removeTypedNames sch cs) [(c1, η), (c2, τ)]) = List.map Prod.fst (Schema.removeTypedNames sch cs) ++ [c1, c2]
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_η t : Table sch cs : ActionList (Schema.removeTypedName τ) sch c1 c2 : η this : List.map Prod.fst (List.append (Schema.removeTypedNames sch cs) [(c1, η), (c2, τ)]) = List.append (List.map Prod.fst (Schema.removeTypedNames sch cs)) (List.map Prod.fst [(c1, η), (c2, τ)]) ⊢ List.map Prod.fst (List.append (Schema.removeTypedNames sch cs) [(c1, η), (c2, τ)]) = List.map Prod.fst (Schema.removeTypedNames sch cs) ++ [c1, c2]
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
pivotLonger_spec1
[807, 1]
[818, 6]
rw [this]
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_η t : Table sch cs : ActionList (Schema.removeTypedName τ) sch c1 c2 : η this : List.map Prod.fst (List.append (Schema.removeTypedNames sch cs) [(c1, η), (c2, τ)]) = List.append (List.map Prod.fst (Schema.removeTypedNames sch cs)) (List.map Prod.fst [(c1, η), (c2, τ)]) ⊢ List.map Prod.fst (List.append (Schema.removeTypedNames sch cs) [(c1, η), (c2, τ)]) = List.map Prod.fst (Schema.removeTypedNames sch cs) ++ [c1, c2]
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_η t : Table sch cs : ActionList (Schema.removeTypedName τ) sch c1 c2 : η this : List.map Prod.fst (List.append (Schema.removeTypedNames sch cs) [(c1, η), (c2, τ)]) = List.append (List.map Prod.fst (Schema.removeTypedNames sch cs)) (List.map Prod.fst [(c1, η), (c2, τ)]) ⊢ List.append (List.map Prod.fst (Schema.removeTypedNames sch cs)) (List.map Prod.fst [(c1, η), (c2, τ)]) = List.map Prod.fst (Schema.removeTypedNames sch cs) ++ [c1, c2]
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
pivotLonger_spec1
[807, 1]
[818, 6]
rfl
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_η t : Table sch cs : ActionList (Schema.removeTypedName τ) sch c1 c2 : η this : List.map Prod.fst (List.append (Schema.removeTypedNames sch cs) [(c1, η), (c2, τ)]) = List.append (List.map Prod.fst (Schema.removeTypedNames sch cs)) (List.map Prod.fst [(c1, η), (c2, τ)]) ⊢ List.append (List.map Prod.fst (Schema.removeTypedNames sch cs)) (List.map Prod.fst [(c1, η), (c2, τ)]) = List.map Prod.fst (Schema.removeTypedNames sch cs) ++ [c1, c2]
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
pivotWider_spec1
[847, 1]
[872, 6]
intro t c1 c2 hc1 hc2 inst
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_η ⊢ ∀ (t : Table sch) (c1 c2 : η) (hc1 : Schema.HasCol (c1, η) sch) (hc2 : Schema.HasCol (c2, τ) (Schema.removeHeader sch hc1)) [inst : DecidableEq (Row (Schema.removeNames sch (ActionList.cons (Schema.cNameOfCHead { fst := (c1, η), snd := hc1 }) (ActionList.cons (Schema.cNameOfCHead { fst := (c2, τ), snd := hc2 }) ActionList.nil))))], header (pivotWider t c1 c2) = Schema.names (Schema.removeNames sch (ActionList.cons (Schema.cNameOfCHead { fst := (c1, η), snd := hc1 }) (ActionList.cons (Schema.cNameOfCHead { fst := (c2, τ), snd := hc2 }) ActionList.nil))) ++ List.unique (List.somes (getColumn2 t c1))
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_η t : Table sch c1 c2 : η hc1 : Schema.HasCol (c1, η) sch hc2 : Schema.HasCol (c2, τ) (Schema.removeHeader sch hc1) inst : DecidableEq (Row (Schema.removeNames sch (ActionList.cons (Schema.cNameOfCHead { fst := (c1, η), snd := hc1 }) (ActionList.cons (Schema.cNameOfCHead { fst := (c2, τ), snd := hc2 }) ActionList.nil)))) ⊢ header (pivotWider t c1 c2) = Schema.names (Schema.removeNames sch (ActionList.cons (Schema.cNameOfCHead { fst := (c1, η), snd := hc1 }) (ActionList.cons (Schema.cNameOfCHead { fst := (c2, τ), snd := hc2 }) ActionList.nil))) ++ List.unique (List.somes (getColumn2 t c1))
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
pivotWider_spec1
[847, 1]
[872, 6]
simp only [header, Schema.names]
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_η t : Table sch c1 c2 : η hc1 : Schema.HasCol (c1, η) sch hc2 : Schema.HasCol (c2, τ) (Schema.removeHeader sch hc1) inst : DecidableEq (Row (Schema.removeNames sch (ActionList.cons (Schema.cNameOfCHead { fst := (c1, η), snd := hc1 }) (ActionList.cons (Schema.cNameOfCHead { fst := (c2, τ), snd := hc2 }) ActionList.nil)))) ⊢ header (pivotWider t c1 c2) = Schema.names (Schema.removeNames sch (ActionList.cons (Schema.cNameOfCHead { fst := (c1, η), snd := hc1 }) (ActionList.cons (Schema.cNameOfCHead { fst := (c2, τ), snd := hc2 }) ActionList.nil))) ++ List.unique (List.somes (getColumn2 t c1))
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_η t : Table sch c1 c2 : η hc1 : Schema.HasCol (c1, η) sch hc2 : Schema.HasCol (c2, τ) (Schema.removeHeader sch hc1) inst : DecidableEq (Row (Schema.removeNames sch (ActionList.cons (Schema.cNameOfCHead { fst := (c1, η), snd := hc1 }) (ActionList.cons (Schema.cNameOfCHead { fst := (c2, τ), snd := hc2 }) ActionList.nil)))) ⊢ List.map Prod.fst (Schema.append (Schema.removeHeaders sch (ActionList.cons { fst := (c1, η), snd := hc1 } (ActionList.cons { fst := (c2, τ), snd := hc2 } ActionList.nil))) (List.map (fun x => (x, τ)) (List.unique (List.somes (getColumn2 t c1))))) = List.map Prod.fst (Schema.removeNames sch (ActionList.cons (Schema.cNameOfCHead { fst := (c1, η), snd := hc1 }) (ActionList.cons (Schema.cNameOfCHead { fst := (c2, τ), snd := hc2 }) ActionList.nil))) ++ List.unique (List.somes (getColumn2 t c1))
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
pivotWider_spec1
[847, 1]
[872, 6]
rw [Schema.append_eq_List_append]
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_η t : Table sch c1 c2 : η hc1 : Schema.HasCol (c1, η) sch hc2 : Schema.HasCol (c2, τ) (Schema.removeHeader sch hc1) inst : DecidableEq (Row (Schema.removeNames sch (ActionList.cons (Schema.cNameOfCHead { fst := (c1, η), snd := hc1 }) (ActionList.cons (Schema.cNameOfCHead { fst := (c2, τ), snd := hc2 }) ActionList.nil)))) ⊢ List.map Prod.fst (Schema.append (Schema.removeHeaders sch (ActionList.cons { fst := (c1, η), snd := hc1 } (ActionList.cons { fst := (c2, τ), snd := hc2 } ActionList.nil))) (List.map (fun x => (x, τ)) (List.unique (List.somes (getColumn2 t c1))))) = List.map Prod.fst (Schema.removeNames sch (ActionList.cons (Schema.cNameOfCHead { fst := (c1, η), snd := hc1 }) (ActionList.cons (Schema.cNameOfCHead { fst := (c2, τ), snd := hc2 }) ActionList.nil))) ++ List.unique (List.somes (getColumn2 t c1))
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_η t : Table sch c1 c2 : η hc1 : Schema.HasCol (c1, η) sch hc2 : Schema.HasCol (c2, τ) (Schema.removeHeader sch hc1) inst : DecidableEq (Row (Schema.removeNames sch (ActionList.cons (Schema.cNameOfCHead { fst := (c1, η), snd := hc1 }) (ActionList.cons (Schema.cNameOfCHead { fst := (c2, τ), snd := hc2 }) ActionList.nil)))) ⊢ List.map Prod.fst (List.append (Schema.removeHeaders sch (ActionList.cons { fst := (c1, η), snd := hc1 } (ActionList.cons { fst := (c2, τ), snd := hc2 } ActionList.nil))) (List.map (fun x => (x, τ)) (List.unique (List.somes (getColumn2 t c1))))) = List.map Prod.fst (Schema.removeNames sch (ActionList.cons (Schema.cNameOfCHead { fst := (c1, η), snd := hc1 }) (ActionList.cons (Schema.cNameOfCHead { fst := (c2, τ), snd := hc2 }) ActionList.nil))) ++ List.unique (List.somes (getColumn2 t c1))
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
pivotWider_spec1
[847, 1]
[872, 6]
have := List.map_append Prod.fst (Schema.removeHeaders sch (ActionList.cons { fst := (c1, η), snd := hc1 } (ActionList.cons { fst := (c2, τ), snd := hc2 } ActionList.nil))) (List.map (fun x => (x, τ)) (List.unique (List.somes (getColumn2 t c1 hc1))))
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_η t : Table sch c1 c2 : η hc1 : Schema.HasCol (c1, η) sch hc2 : Schema.HasCol (c2, τ) (Schema.removeHeader sch hc1) inst : DecidableEq (Row (Schema.removeNames sch (ActionList.cons (Schema.cNameOfCHead { fst := (c1, η), snd := hc1 }) (ActionList.cons (Schema.cNameOfCHead { fst := (c2, τ), snd := hc2 }) ActionList.nil)))) ⊢ List.map Prod.fst (List.append (Schema.removeHeaders sch (ActionList.cons { fst := (c1, η), snd := hc1 } (ActionList.cons { fst := (c2, τ), snd := hc2 } ActionList.nil))) (List.map (fun x => (x, τ)) (List.unique (List.somes (getColumn2 t c1))))) = List.map Prod.fst (Schema.removeNames sch (ActionList.cons (Schema.cNameOfCHead { fst := (c1, η), snd := hc1 }) (ActionList.cons (Schema.cNameOfCHead { fst := (c2, τ), snd := hc2 }) ActionList.nil))) ++ List.unique (List.somes (getColumn2 t c1))
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_η t : Table sch c1 c2 : η hc1 : Schema.HasCol (c1, η) sch hc2 : Schema.HasCol (c2, τ) (Schema.removeHeader sch hc1) inst : DecidableEq (Row (Schema.removeNames sch (ActionList.cons (Schema.cNameOfCHead { fst := (c1, η), snd := hc1 }) (ActionList.cons (Schema.cNameOfCHead { fst := (c2, τ), snd := hc2 }) ActionList.nil)))) this : List.map Prod.fst (Schema.removeHeaders sch (ActionList.cons { fst := (c1, η), snd := hc1 } (ActionList.cons { fst := (c2, τ), snd := hc2 } ActionList.nil)) ++ List.map (fun x => (x, τ)) (List.unique (List.somes (getColumn2 t c1)))) = List.map Prod.fst (Schema.removeHeaders sch (ActionList.cons { fst := (c1, η), snd := hc1 } (ActionList.cons { fst := (c2, τ), snd := hc2 } ActionList.nil))) ++ List.map Prod.fst (List.map (fun x => (x, τ)) (List.unique (List.somes (getColumn2 t c1)))) ⊢ List.map Prod.fst (List.append (Schema.removeHeaders sch (ActionList.cons { fst := (c1, η), snd := hc1 } (ActionList.cons { fst := (c2, τ), snd := hc2 } ActionList.nil))) (List.map (fun x => (x, τ)) (List.unique (List.somes (getColumn2 t c1))))) = List.map Prod.fst (Schema.removeNames sch (ActionList.cons (Schema.cNameOfCHead { fst := (c1, η), snd := hc1 }) (ActionList.cons (Schema.cNameOfCHead { fst := (c2, τ), snd := hc2 }) ActionList.nil))) ++ List.unique (List.somes (getColumn2 t c1))
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
pivotWider_spec1
[847, 1]
[872, 6]
simp only [HAppend.hAppend, Append.append] at this
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_η t : Table sch c1 c2 : η hc1 : Schema.HasCol (c1, η) sch hc2 : Schema.HasCol (c2, τ) (Schema.removeHeader sch hc1) inst : DecidableEq (Row (Schema.removeNames sch (ActionList.cons (Schema.cNameOfCHead { fst := (c1, η), snd := hc1 }) (ActionList.cons (Schema.cNameOfCHead { fst := (c2, τ), snd := hc2 }) ActionList.nil)))) this : List.map Prod.fst (Schema.removeHeaders sch (ActionList.cons { fst := (c1, η), snd := hc1 } (ActionList.cons { fst := (c2, τ), snd := hc2 } ActionList.nil)) ++ List.map (fun x => (x, τ)) (List.unique (List.somes (getColumn2 t c1)))) = List.map Prod.fst (Schema.removeHeaders sch (ActionList.cons { fst := (c1, η), snd := hc1 } (ActionList.cons { fst := (c2, τ), snd := hc2 } ActionList.nil))) ++ List.map Prod.fst (List.map (fun x => (x, τ)) (List.unique (List.somes (getColumn2 t c1)))) ⊢ List.map Prod.fst (List.append (Schema.removeHeaders sch (ActionList.cons { fst := (c1, η), snd := hc1 } (ActionList.cons { fst := (c2, τ), snd := hc2 } ActionList.nil))) (List.map (fun x => (x, τ)) (List.unique (List.somes (getColumn2 t c1))))) = List.map Prod.fst (Schema.removeNames sch (ActionList.cons (Schema.cNameOfCHead { fst := (c1, η), snd := hc1 }) (ActionList.cons (Schema.cNameOfCHead { fst := (c2, τ), snd := hc2 }) ActionList.nil))) ++ List.unique (List.somes (getColumn2 t c1))
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_η t : Table sch c1 c2 : η hc1 : Schema.HasCol (c1, η) sch hc2 : Schema.HasCol (c2, τ) (Schema.removeHeader sch hc1) inst : DecidableEq (Row (Schema.removeNames sch (ActionList.cons (Schema.cNameOfCHead { fst := (c1, η), snd := hc1 }) (ActionList.cons (Schema.cNameOfCHead { fst := (c2, τ), snd := hc2 }) ActionList.nil)))) this : List.map Prod.fst (List.append (Schema.removeHeaders sch (ActionList.cons { fst := (c1, η), snd := hc1 } (ActionList.cons { fst := (c2, τ), snd := hc2 } ActionList.nil))) (List.map (fun x => (x, τ)) (List.unique (List.somes (getColumn2 t c1))))) = List.append (List.map Prod.fst (Schema.removeHeaders sch (ActionList.cons { fst := (c1, η), snd := hc1 } (ActionList.cons { fst := (c2, τ), snd := hc2 } ActionList.nil)))) (List.map Prod.fst (List.map (fun x => (x, τ)) (List.unique (List.somes (getColumn2 t c1))))) ⊢ List.map Prod.fst (List.append (Schema.removeHeaders sch (ActionList.cons { fst := (c1, η), snd := hc1 } (ActionList.cons { fst := (c2, τ), snd := hc2 } ActionList.nil))) (List.map (fun x => (x, τ)) (List.unique (List.somes (getColumn2 t c1))))) = List.map Prod.fst (Schema.removeNames sch (ActionList.cons (Schema.cNameOfCHead { fst := (c1, η), snd := hc1 }) (ActionList.cons (Schema.cNameOfCHead { fst := (c2, τ), snd := hc2 }) ActionList.nil))) ++ List.unique (List.somes (getColumn2 t c1))
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
pivotWider_spec1
[847, 1]
[872, 6]
rw [this]
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_η t : Table sch c1 c2 : η hc1 : Schema.HasCol (c1, η) sch hc2 : Schema.HasCol (c2, τ) (Schema.removeHeader sch hc1) inst : DecidableEq (Row (Schema.removeNames sch (ActionList.cons (Schema.cNameOfCHead { fst := (c1, η), snd := hc1 }) (ActionList.cons (Schema.cNameOfCHead { fst := (c2, τ), snd := hc2 }) ActionList.nil)))) this : List.map Prod.fst (List.append (Schema.removeHeaders sch (ActionList.cons { fst := (c1, η), snd := hc1 } (ActionList.cons { fst := (c2, τ), snd := hc2 } ActionList.nil))) (List.map (fun x => (x, τ)) (List.unique (List.somes (getColumn2 t c1))))) = List.append (List.map Prod.fst (Schema.removeHeaders sch (ActionList.cons { fst := (c1, η), snd := hc1 } (ActionList.cons { fst := (c2, τ), snd := hc2 } ActionList.nil)))) (List.map Prod.fst (List.map (fun x => (x, τ)) (List.unique (List.somes (getColumn2 t c1))))) ⊢ List.map Prod.fst (List.append (Schema.removeHeaders sch (ActionList.cons { fst := (c1, η), snd := hc1 } (ActionList.cons { fst := (c2, τ), snd := hc2 } ActionList.nil))) (List.map (fun x => (x, τ)) (List.unique (List.somes (getColumn2 t c1))))) = List.map Prod.fst (Schema.removeNames sch (ActionList.cons (Schema.cNameOfCHead { fst := (c1, η), snd := hc1 }) (ActionList.cons (Schema.cNameOfCHead { fst := (c2, τ), snd := hc2 }) ActionList.nil))) ++ List.unique (List.somes (getColumn2 t c1))
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_η t : Table sch c1 c2 : η hc1 : Schema.HasCol (c1, η) sch hc2 : Schema.HasCol (c2, τ) (Schema.removeHeader sch hc1) inst : DecidableEq (Row (Schema.removeNames sch (ActionList.cons (Schema.cNameOfCHead { fst := (c1, η), snd := hc1 }) (ActionList.cons (Schema.cNameOfCHead { fst := (c2, τ), snd := hc2 }) ActionList.nil)))) this : List.map Prod.fst (List.append (Schema.removeHeaders sch (ActionList.cons { fst := (c1, η), snd := hc1 } (ActionList.cons { fst := (c2, τ), snd := hc2 } ActionList.nil))) (List.map (fun x => (x, τ)) (List.unique (List.somes (getColumn2 t c1))))) = List.append (List.map Prod.fst (Schema.removeHeaders sch (ActionList.cons { fst := (c1, η), snd := hc1 } (ActionList.cons { fst := (c2, τ), snd := hc2 } ActionList.nil)))) (List.map Prod.fst (List.map (fun x => (x, τ)) (List.unique (List.somes (getColumn2 t c1))))) ⊢ List.append (List.map Prod.fst (Schema.removeHeaders sch (ActionList.cons { fst := (c1, η), snd := hc1 } (ActionList.cons { fst := (c2, τ), snd := hc2 } ActionList.nil)))) (List.map Prod.fst (List.map (fun x => (x, τ)) (List.unique (List.somes (getColumn2 t c1))))) = List.map Prod.fst (Schema.removeNames sch (ActionList.cons (Schema.cNameOfCHead { fst := (c1, η), snd := hc1 }) (ActionList.cons (Schema.cNameOfCHead { fst := (c2, τ), snd := hc2 }) ActionList.nil))) ++ List.unique (List.somes (getColumn2 t c1))
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
pivotWider_spec1
[847, 1]
[872, 6]
rw [List.map_map]
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_η t : Table sch c1 c2 : η hc1 : Schema.HasCol (c1, η) sch hc2 : Schema.HasCol (c2, τ) (Schema.removeHeader sch hc1) inst : DecidableEq (Row (Schema.removeNames sch (ActionList.cons (Schema.cNameOfCHead { fst := (c1, η), snd := hc1 }) (ActionList.cons (Schema.cNameOfCHead { fst := (c2, τ), snd := hc2 }) ActionList.nil)))) this : List.map Prod.fst (List.append (Schema.removeHeaders sch (ActionList.cons { fst := (c1, η), snd := hc1 } (ActionList.cons { fst := (c2, τ), snd := hc2 } ActionList.nil))) (List.map (fun x => (x, τ)) (List.unique (List.somes (getColumn2 t c1))))) = List.append (List.map Prod.fst (Schema.removeHeaders sch (ActionList.cons { fst := (c1, η), snd := hc1 } (ActionList.cons { fst := (c2, τ), snd := hc2 } ActionList.nil)))) (List.map Prod.fst (List.map (fun x => (x, τ)) (List.unique (List.somes (getColumn2 t c1))))) ⊢ List.append (List.map Prod.fst (Schema.removeHeaders sch (ActionList.cons { fst := (c1, η), snd := hc1 } (ActionList.cons { fst := (c2, τ), snd := hc2 } ActionList.nil)))) (List.map Prod.fst (List.map (fun x => (x, τ)) (List.unique (List.somes (getColumn2 t c1))))) = List.map Prod.fst (Schema.removeNames sch (ActionList.cons (Schema.cNameOfCHead { fst := (c1, η), snd := hc1 }) (ActionList.cons (Schema.cNameOfCHead { fst := (c2, τ), snd := hc2 }) ActionList.nil))) ++ List.unique (List.somes (getColumn2 t c1))
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_η t : Table sch c1 c2 : η hc1 : Schema.HasCol (c1, η) sch hc2 : Schema.HasCol (c2, τ) (Schema.removeHeader sch hc1) inst : DecidableEq (Row (Schema.removeNames sch (ActionList.cons (Schema.cNameOfCHead { fst := (c1, η), snd := hc1 }) (ActionList.cons (Schema.cNameOfCHead { fst := (c2, τ), snd := hc2 }) ActionList.nil)))) this : List.map Prod.fst (List.append (Schema.removeHeaders sch (ActionList.cons { fst := (c1, η), snd := hc1 } (ActionList.cons { fst := (c2, τ), snd := hc2 } ActionList.nil))) (List.map (fun x => (x, τ)) (List.unique (List.somes (getColumn2 t c1))))) = List.append (List.map Prod.fst (Schema.removeHeaders sch (ActionList.cons { fst := (c1, η), snd := hc1 } (ActionList.cons { fst := (c2, τ), snd := hc2 } ActionList.nil)))) (List.map Prod.fst (List.map (fun x => (x, τ)) (List.unique (List.somes (getColumn2 t c1))))) ⊢ List.append (List.map Prod.fst (Schema.removeHeaders sch (ActionList.cons { fst := (c1, η), snd := hc1 } (ActionList.cons { fst := (c2, τ), snd := hc2 } ActionList.nil)))) (List.map (Prod.fst ∘ fun x => (x, τ)) (List.unique (List.somes (getColumn2 t c1)))) = List.map Prod.fst (Schema.removeNames sch (ActionList.cons (Schema.cNameOfCHead { fst := (c1, η), snd := hc1 }) (ActionList.cons (Schema.cNameOfCHead { fst := (c2, τ), snd := hc2 }) ActionList.nil))) ++ List.unique (List.somes (getColumn2 t c1))
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
pivotWider_spec1
[847, 1]
[872, 6]
have hf : (Prod.fst ∘ fun x => (x, τ)) = @id η := funext (λ _ => rfl)
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_η t : Table sch c1 c2 : η hc1 : Schema.HasCol (c1, η) sch hc2 : Schema.HasCol (c2, τ) (Schema.removeHeader sch hc1) inst : DecidableEq (Row (Schema.removeNames sch (ActionList.cons (Schema.cNameOfCHead { fst := (c1, η), snd := hc1 }) (ActionList.cons (Schema.cNameOfCHead { fst := (c2, τ), snd := hc2 }) ActionList.nil)))) this : List.map Prod.fst (List.append (Schema.removeHeaders sch (ActionList.cons { fst := (c1, η), snd := hc1 } (ActionList.cons { fst := (c2, τ), snd := hc2 } ActionList.nil))) (List.map (fun x => (x, τ)) (List.unique (List.somes (getColumn2 t c1))))) = List.append (List.map Prod.fst (Schema.removeHeaders sch (ActionList.cons { fst := (c1, η), snd := hc1 } (ActionList.cons { fst := (c2, τ), snd := hc2 } ActionList.nil)))) (List.map Prod.fst (List.map (fun x => (x, τ)) (List.unique (List.somes (getColumn2 t c1))))) ⊢ List.append (List.map Prod.fst (Schema.removeHeaders sch (ActionList.cons { fst := (c1, η), snd := hc1 } (ActionList.cons { fst := (c2, τ), snd := hc2 } ActionList.nil)))) (List.map (Prod.fst ∘ fun x => (x, τ)) (List.unique (List.somes (getColumn2 t c1)))) = List.map Prod.fst (Schema.removeNames sch (ActionList.cons (Schema.cNameOfCHead { fst := (c1, η), snd := hc1 }) (ActionList.cons (Schema.cNameOfCHead { fst := (c2, τ), snd := hc2 }) ActionList.nil))) ++ List.unique (List.somes (getColumn2 t c1))
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_η t : Table sch c1 c2 : η hc1 : Schema.HasCol (c1, η) sch hc2 : Schema.HasCol (c2, τ) (Schema.removeHeader sch hc1) inst : DecidableEq (Row (Schema.removeNames sch (ActionList.cons (Schema.cNameOfCHead { fst := (c1, η), snd := hc1 }) (ActionList.cons (Schema.cNameOfCHead { fst := (c2, τ), snd := hc2 }) ActionList.nil)))) this : List.map Prod.fst (List.append (Schema.removeHeaders sch (ActionList.cons { fst := (c1, η), snd := hc1 } (ActionList.cons { fst := (c2, τ), snd := hc2 } ActionList.nil))) (List.map (fun x => (x, τ)) (List.unique (List.somes (getColumn2 t c1))))) = List.append (List.map Prod.fst (Schema.removeHeaders sch (ActionList.cons { fst := (c1, η), snd := hc1 } (ActionList.cons { fst := (c2, τ), snd := hc2 } ActionList.nil)))) (List.map Prod.fst (List.map (fun x => (x, τ)) (List.unique (List.somes (getColumn2 t c1))))) hf : (Prod.fst ∘ fun x => (x, τ)) = id ⊢ List.append (List.map Prod.fst (Schema.removeHeaders sch (ActionList.cons { fst := (c1, η), snd := hc1 } (ActionList.cons { fst := (c2, τ), snd := hc2 } ActionList.nil)))) (List.map (Prod.fst ∘ fun x => (x, τ)) (List.unique (List.somes (getColumn2 t c1)))) = List.map Prod.fst (Schema.removeNames sch (ActionList.cons (Schema.cNameOfCHead { fst := (c1, η), snd := hc1 }) (ActionList.cons (Schema.cNameOfCHead { fst := (c2, τ), snd := hc2 }) ActionList.nil))) ++ List.unique (List.somes (getColumn2 t c1))
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
pivotWider_spec1
[847, 1]
[872, 6]
rw [hf]
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_η t : Table sch c1 c2 : η hc1 : Schema.HasCol (c1, η) sch hc2 : Schema.HasCol (c2, τ) (Schema.removeHeader sch hc1) inst : DecidableEq (Row (Schema.removeNames sch (ActionList.cons (Schema.cNameOfCHead { fst := (c1, η), snd := hc1 }) (ActionList.cons (Schema.cNameOfCHead { fst := (c2, τ), snd := hc2 }) ActionList.nil)))) this : List.map Prod.fst (List.append (Schema.removeHeaders sch (ActionList.cons { fst := (c1, η), snd := hc1 } (ActionList.cons { fst := (c2, τ), snd := hc2 } ActionList.nil))) (List.map (fun x => (x, τ)) (List.unique (List.somes (getColumn2 t c1))))) = List.append (List.map Prod.fst (Schema.removeHeaders sch (ActionList.cons { fst := (c1, η), snd := hc1 } (ActionList.cons { fst := (c2, τ), snd := hc2 } ActionList.nil)))) (List.map Prod.fst (List.map (fun x => (x, τ)) (List.unique (List.somes (getColumn2 t c1))))) hf : (Prod.fst ∘ fun x => (x, τ)) = id ⊢ List.append (List.map Prod.fst (Schema.removeHeaders sch (ActionList.cons { fst := (c1, η), snd := hc1 } (ActionList.cons { fst := (c2, τ), snd := hc2 } ActionList.nil)))) (List.map (Prod.fst ∘ fun x => (x, τ)) (List.unique (List.somes (getColumn2 t c1)))) = List.map Prod.fst (Schema.removeNames sch (ActionList.cons (Schema.cNameOfCHead { fst := (c1, η), snd := hc1 }) (ActionList.cons (Schema.cNameOfCHead { fst := (c2, τ), snd := hc2 }) ActionList.nil))) ++ List.unique (List.somes (getColumn2 t c1))
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_η t : Table sch c1 c2 : η hc1 : Schema.HasCol (c1, η) sch hc2 : Schema.HasCol (c2, τ) (Schema.removeHeader sch hc1) inst : DecidableEq (Row (Schema.removeNames sch (ActionList.cons (Schema.cNameOfCHead { fst := (c1, η), snd := hc1 }) (ActionList.cons (Schema.cNameOfCHead { fst := (c2, τ), snd := hc2 }) ActionList.nil)))) this : List.map Prod.fst (List.append (Schema.removeHeaders sch (ActionList.cons { fst := (c1, η), snd := hc1 } (ActionList.cons { fst := (c2, τ), snd := hc2 } ActionList.nil))) (List.map (fun x => (x, τ)) (List.unique (List.somes (getColumn2 t c1))))) = List.append (List.map Prod.fst (Schema.removeHeaders sch (ActionList.cons { fst := (c1, η), snd := hc1 } (ActionList.cons { fst := (c2, τ), snd := hc2 } ActionList.nil)))) (List.map Prod.fst (List.map (fun x => (x, τ)) (List.unique (List.somes (getColumn2 t c1))))) hf : (Prod.fst ∘ fun x => (x, τ)) = id ⊢ List.append (List.map Prod.fst (Schema.removeHeaders sch (ActionList.cons { fst := (c1, η), snd := hc1 } (ActionList.cons { fst := (c2, τ), snd := hc2 } ActionList.nil)))) (List.map id (List.unique (List.somes (getColumn2 t c1)))) = List.map Prod.fst (Schema.removeNames sch (ActionList.cons (Schema.cNameOfCHead { fst := (c1, η), snd := hc1 }) (ActionList.cons (Schema.cNameOfCHead { fst := (c2, τ), snd := hc2 }) ActionList.nil))) ++ List.unique (List.somes (getColumn2 t c1))
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
pivotWider_spec1
[847, 1]
[872, 6]
rw [List.map_id]
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_η t : Table sch c1 c2 : η hc1 : Schema.HasCol (c1, η) sch hc2 : Schema.HasCol (c2, τ) (Schema.removeHeader sch hc1) inst : DecidableEq (Row (Schema.removeNames sch (ActionList.cons (Schema.cNameOfCHead { fst := (c1, η), snd := hc1 }) (ActionList.cons (Schema.cNameOfCHead { fst := (c2, τ), snd := hc2 }) ActionList.nil)))) this : List.map Prod.fst (List.append (Schema.removeHeaders sch (ActionList.cons { fst := (c1, η), snd := hc1 } (ActionList.cons { fst := (c2, τ), snd := hc2 } ActionList.nil))) (List.map (fun x => (x, τ)) (List.unique (List.somes (getColumn2 t c1))))) = List.append (List.map Prod.fst (Schema.removeHeaders sch (ActionList.cons { fst := (c1, η), snd := hc1 } (ActionList.cons { fst := (c2, τ), snd := hc2 } ActionList.nil)))) (List.map Prod.fst (List.map (fun x => (x, τ)) (List.unique (List.somes (getColumn2 t c1))))) hf : (Prod.fst ∘ fun x => (x, τ)) = id ⊢ List.append (List.map Prod.fst (Schema.removeHeaders sch (ActionList.cons { fst := (c1, η), snd := hc1 } (ActionList.cons { fst := (c2, τ), snd := hc2 } ActionList.nil)))) (List.map id (List.unique (List.somes (getColumn2 t c1)))) = List.map Prod.fst (Schema.removeNames sch (ActionList.cons (Schema.cNameOfCHead { fst := (c1, η), snd := hc1 }) (ActionList.cons (Schema.cNameOfCHead { fst := (c2, τ), snd := hc2 }) ActionList.nil))) ++ List.unique (List.somes (getColumn2 t c1))
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_η t : Table sch c1 c2 : η hc1 : Schema.HasCol (c1, η) sch hc2 : Schema.HasCol (c2, τ) (Schema.removeHeader sch hc1) inst : DecidableEq (Row (Schema.removeNames sch (ActionList.cons (Schema.cNameOfCHead { fst := (c1, η), snd := hc1 }) (ActionList.cons (Schema.cNameOfCHead { fst := (c2, τ), snd := hc2 }) ActionList.nil)))) this : List.map Prod.fst (List.append (Schema.removeHeaders sch (ActionList.cons { fst := (c1, η), snd := hc1 } (ActionList.cons { fst := (c2, τ), snd := hc2 } ActionList.nil))) (List.map (fun x => (x, τ)) (List.unique (List.somes (getColumn2 t c1))))) = List.append (List.map Prod.fst (Schema.removeHeaders sch (ActionList.cons { fst := (c1, η), snd := hc1 } (ActionList.cons { fst := (c2, τ), snd := hc2 } ActionList.nil)))) (List.map Prod.fst (List.map (fun x => (x, τ)) (List.unique (List.somes (getColumn2 t c1))))) hf : (Prod.fst ∘ fun x => (x, τ)) = id ⊢ List.append (List.map Prod.fst (Schema.removeHeaders sch (ActionList.cons { fst := (c1, η), snd := hc1 } (ActionList.cons { fst := (c2, τ), snd := hc2 } ActionList.nil)))) (List.unique (List.somes (getColumn2 t c1))) = List.map Prod.fst (Schema.removeNames sch (ActionList.cons (Schema.cNameOfCHead { fst := (c1, η), snd := hc1 }) (ActionList.cons (Schema.cNameOfCHead { fst := (c2, τ), snd := hc2 }) ActionList.nil))) ++ List.unique (List.somes (getColumn2 t c1))
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
pivotWider_spec1
[847, 1]
[872, 6]
rfl
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_η t : Table sch c1 c2 : η hc1 : Schema.HasCol (c1, η) sch hc2 : Schema.HasCol (c2, τ) (Schema.removeHeader sch hc1) inst : DecidableEq (Row (Schema.removeNames sch (ActionList.cons (Schema.cNameOfCHead { fst := (c1, η), snd := hc1 }) (ActionList.cons (Schema.cNameOfCHead { fst := (c2, τ), snd := hc2 }) ActionList.nil)))) this : List.map Prod.fst (List.append (Schema.removeHeaders sch (ActionList.cons { fst := (c1, η), snd := hc1 } (ActionList.cons { fst := (c2, τ), snd := hc2 } ActionList.nil))) (List.map (fun x => (x, τ)) (List.unique (List.somes (getColumn2 t c1))))) = List.append (List.map Prod.fst (Schema.removeHeaders sch (ActionList.cons { fst := (c1, η), snd := hc1 } (ActionList.cons { fst := (c2, τ), snd := hc2 } ActionList.nil)))) (List.map Prod.fst (List.map (fun x => (x, τ)) (List.unique (List.somes (getColumn2 t c1))))) hf : (Prod.fst ∘ fun x => (x, τ)) = id ⊢ List.append (List.map Prod.fst (Schema.removeHeaders sch (ActionList.cons { fst := (c1, η), snd := hc1 } (ActionList.cons { fst := (c2, τ), snd := hc2 } ActionList.nil)))) (List.unique (List.somes (getColumn2 t c1))) = List.map Prod.fst (Schema.removeNames sch (ActionList.cons (Schema.cNameOfCHead { fst := (c1, η), snd := hc1 }) (ActionList.cons (Schema.cNameOfCHead { fst := (c2, τ), snd := hc2 }) ActionList.nil))) ++ List.unique (List.somes (getColumn2 t c1))
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
flatten_spec1
[919, 1]
[930, 22]
intros t cs
η : Type u_η dec_η : DecidableEq η sch : Schema ⊢ ∀ (t : Table sch) (cs : ActionList Schema.flattenList sch), header (flatten t cs) = header t
η : Type u_η dec_η : DecidableEq η sch : Schema t : Table sch cs : ActionList Schema.flattenList sch ⊢ header (flatten t cs) = header t
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
flatten_spec1
[919, 1]
[930, 22]
simp only [flatten, header, Schema.names]
η : Type u_η dec_η : DecidableEq η sch : Schema t : Table sch cs : ActionList Schema.flattenList sch ⊢ header (flatten t cs) = header t
η : Type u_η dec_η : DecidableEq η sch : Schema t : Table sch cs : ActionList Schema.flattenList sch ⊢ List.map Prod.fst (Schema.flattenLists sch cs) = List.map Prod.fst sch
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
flatten_spec1
[919, 1]
[930, 22]
induction cs with | nil => rfl | cons c cs ih => rw [ih] simp only [Schema.flattenList] apply Schema.retypeColumn_preserves_names exact Table.mk []
η : Type u_η dec_η : DecidableEq η sch : Schema t : Table sch cs : ActionList Schema.flattenList sch ⊢ List.map Prod.fst (Schema.flattenLists sch cs) = List.map Prod.fst sch
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
flatten_spec1
[919, 1]
[930, 22]
rfl
case nil η : Type u_η dec_η : DecidableEq η sch schema✝ : Schema t : Table schema✝ ⊢ List.map Prod.fst (Schema.flattenLists schema✝ ActionList.nil) = List.map Prod.fst schema✝
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
flatten_spec1
[919, 1]
[930, 22]
rw [ih]
case cons η : Type u_η dec_η : DecidableEq η sch schema✝ : Schema c : (c : η) × (τ : Type u_1) × Schema.HasCol (c, List τ) schema✝ cs : ActionList Schema.flattenList (Schema.flattenList schema✝ c) ih : Table (Schema.flattenList schema✝ c) → List.map Prod.fst (Schema.flattenLists (Schema.flattenList schema✝ c) cs) = List.map Prod.fst (Schema.flattenList schema✝ c) t : Table schema✝ ⊢ List.map Prod.fst (Schema.flattenLists schema✝ (ActionList.cons c cs)) = List.map Prod.fst schema✝
case cons η : Type u_η dec_η : DecidableEq η sch schema✝ : Schema c : (c : η) × (τ : Type u_1) × Schema.HasCol (c, List τ) schema✝ cs : ActionList Schema.flattenList (Schema.flattenList schema✝ c) ih : Table (Schema.flattenList schema✝ c) → List.map Prod.fst (Schema.flattenLists (Schema.flattenList schema✝ c) cs) = List.map Prod.fst (Schema.flattenList schema✝ c) t : Table schema✝ ⊢ List.map Prod.fst (Schema.flattenList schema✝ c) = List.map Prod.fst schema✝ case cons η : Type u_η dec_η : DecidableEq η sch schema✝ : Schema c : (c : η) × (τ : Type u_1) × Schema.HasCol (c, List τ) schema✝ cs : ActionList Schema.flattenList (Schema.flattenList schema✝ c) ih : Table (Schema.flattenList schema✝ c) → List.map Prod.fst (Schema.flattenLists (Schema.flattenList schema✝ c) cs) = List.map Prod.fst (Schema.flattenList schema✝ c) t : Table schema✝ ⊢ Table (Schema.flattenList schema✝ c)
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
flatten_spec1
[919, 1]
[930, 22]
simp only [Schema.flattenList]
case cons η : Type u_η dec_η : DecidableEq η sch schema✝ : Schema c : (c : η) × (τ : Type u_1) × Schema.HasCol (c, List τ) schema✝ cs : ActionList Schema.flattenList (Schema.flattenList schema✝ c) ih : Table (Schema.flattenList schema✝ c) → List.map Prod.fst (Schema.flattenLists (Schema.flattenList schema✝ c) cs) = List.map Prod.fst (Schema.flattenList schema✝ c) t : Table schema✝ ⊢ List.map Prod.fst (Schema.flattenList schema✝ c) = List.map Prod.fst schema✝ case cons η : Type u_η dec_η : DecidableEq η sch schema✝ : Schema c : (c : η) × (τ : Type u_1) × Schema.HasCol (c, List τ) schema✝ cs : ActionList Schema.flattenList (Schema.flattenList schema✝ c) ih : Table (Schema.flattenList schema✝ c) → List.map Prod.fst (Schema.flattenLists (Schema.flattenList schema✝ c) cs) = List.map Prod.fst (Schema.flattenList schema✝ c) t : Table schema✝ ⊢ Table (Schema.flattenList schema✝ c)
case cons η : Type u_η dec_η : DecidableEq η sch schema✝ : Schema c : (c : η) × (τ : Type u_1) × Schema.HasCol (c, List τ) schema✝ cs : ActionList Schema.flattenList (Schema.flattenList schema✝ c) ih : Table (Schema.flattenList schema✝ c) → List.map Prod.fst (Schema.flattenLists (Schema.flattenList schema✝ c) cs) = List.map Prod.fst (Schema.flattenList schema✝ c) t : Table schema✝ ⊢ List.map Prod.fst (Schema.retypeColumn schema✝ (Schema.colImpliesName c.snd.snd) c.snd.fst) = List.map Prod.fst schema✝ case cons η : Type u_η dec_η : DecidableEq η sch schema✝ : Schema c : (c : η) × (τ : Type u_1) × Schema.HasCol (c, List τ) schema✝ cs : ActionList Schema.flattenList (Schema.flattenList schema✝ c) ih : Table (Schema.flattenList schema✝ c) → List.map Prod.fst (Schema.flattenLists (Schema.flattenList schema✝ c) cs) = List.map Prod.fst (Schema.flattenList schema✝ c) t : Table schema✝ ⊢ Table (Schema.flattenList schema✝ c)
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
flatten_spec1
[919, 1]
[930, 22]
apply Schema.retypeColumn_preserves_names
case cons η : Type u_η dec_η : DecidableEq η sch schema✝ : Schema c : (c : η) × (τ : Type u_1) × Schema.HasCol (c, List τ) schema✝ cs : ActionList Schema.flattenList (Schema.flattenList schema✝ c) ih : Table (Schema.flattenList schema✝ c) → List.map Prod.fst (Schema.flattenLists (Schema.flattenList schema✝ c) cs) = List.map Prod.fst (Schema.flattenList schema✝ c) t : Table schema✝ ⊢ List.map Prod.fst (Schema.retypeColumn schema✝ (Schema.colImpliesName c.snd.snd) c.snd.fst) = List.map Prod.fst schema✝ case cons η : Type u_η dec_η : DecidableEq η sch schema✝ : Schema c : (c : η) × (τ : Type u_1) × Schema.HasCol (c, List τ) schema✝ cs : ActionList Schema.flattenList (Schema.flattenList schema✝ c) ih : Table (Schema.flattenList schema✝ c) → List.map Prod.fst (Schema.flattenLists (Schema.flattenList schema✝ c) cs) = List.map Prod.fst (Schema.flattenList schema✝ c) t : Table schema✝ ⊢ Table (Schema.flattenList schema✝ c)
case cons η : Type u_η dec_η : DecidableEq η sch schema✝ : Schema c : (c : η) × (τ : Type u_1) × Schema.HasCol (c, List τ) schema✝ cs : ActionList Schema.flattenList (Schema.flattenList schema✝ c) ih : Table (Schema.flattenList schema✝ c) → List.map Prod.fst (Schema.flattenLists (Schema.flattenList schema✝ c) cs) = List.map Prod.fst (Schema.flattenList schema✝ c) t : Table schema✝ ⊢ Table (Schema.flattenList schema✝ c)
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
flatten_spec1
[919, 1]
[930, 22]
exact Table.mk []
case cons η : Type u_η dec_η : DecidableEq η sch schema✝ : Schema c : (c : η) × (τ : Type u_1) × Schema.HasCol (c, List τ) schema✝ cs : ActionList Schema.flattenList (Schema.flattenList schema✝ c) ih : Table (Schema.flattenList schema✝ c) → List.map Prod.fst (Schema.flattenLists (Schema.flattenList schema✝ c) cs) = List.map Prod.fst (Schema.flattenList schema✝ c) t : Table schema✝ ⊢ Table (Schema.flattenList schema✝ c)
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
transformColumn_spec4
[996, 1]
[1004, 24]
intro t c f hc
η : Type u_η dec_η : DecidableEq η sch : Schema τ₁ τ₂ : Type u_1 ⊢ ∀ (t : Table sch) (c : η) (f : Option τ₁ → Option τ₂) (hc : Schema.HasCol (c, τ₁) sch), nrows (transformColumn t c f) = nrows t
η : Type u_η dec_η : DecidableEq η sch : Schema τ₁ τ₂ : Type u_1 t : Table sch c : η f : Option τ₁ → Option τ₂ hc : Schema.HasCol (c, τ₁) sch ⊢ nrows (transformColumn t c f) = nrows t
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
transformColumn_spec4
[996, 1]
[1004, 24]
simp only [nrows, transformColumn, Schema.length_eq_List_length]
η : Type u_η dec_η : DecidableEq η sch : Schema τ₁ τ₂ : Type u_1 t : Table sch c : η f : Option τ₁ → Option τ₂ hc : Schema.HasCol (c, τ₁) sch ⊢ nrows (transformColumn t c f) = nrows t
η : Type u_η dec_η : DecidableEq η sch : Schema τ₁ τ₂ : Type u_1 t : Table sch c : η f : Option τ₁ → Option τ₂ hc : Schema.HasCol (c, τ₁) sch ⊢ List.length (List.map (fun r => Row.retypeCell r hc (Cell.fromOption (f (getValue r c)))) t.rows) = List.length t.rows
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
transformColumn_spec4
[996, 1]
[1004, 24]
apply List.length_map
η : Type u_η dec_η : DecidableEq η sch : Schema τ₁ τ₂ : Type u_1 t : Table sch c : η f : Option τ₁ → Option τ₂ hc : Schema.HasCol (c, τ₁) sch ⊢ List.length (List.map (fun r => Row.retypeCell r hc (Cell.fromOption (f (getValue r c)))) t.rows) = List.length t.rows
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
renameColumns_spec3
[1021, 1]
[1027, 24]
intros
η : Type u_η dec_η : DecidableEq η sch : Schema ⊢ ∀ (t : Table sch) (ccs : ActionList Schema.renameColumnCN sch), nrows (renameColumns t ccs) = nrows t
η : Type u_η dec_η : DecidableEq η sch : Schema t✝ : Table sch ccs✝ : ActionList Schema.renameColumnCN sch ⊢ nrows (renameColumns t✝ ccs✝) = nrows t✝
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
renameColumns_spec3
[1021, 1]
[1027, 24]
simp only [nrows, renameColumns, Schema.length_eq_List_length]
η : Type u_η dec_η : DecidableEq η sch : Schema t✝ : Table sch ccs✝ : ActionList Schema.renameColumnCN sch ⊢ nrows (renameColumns t✝ ccs✝) = nrows t✝
η : Type u_η dec_η : DecidableEq η sch : Schema t✝ : Table sch ccs✝ : ActionList Schema.renameColumnCN sch ⊢ List.length (List.map (Row.renameCells ccs✝) t✝.rows) = List.length t✝.rows
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
renameColumns_spec3
[1021, 1]
[1027, 24]
apply List.length_map
η : Type u_η dec_η : DecidableEq η sch : Schema t✝ : Table sch ccs✝ : ActionList Schema.renameColumnCN sch ⊢ List.length (List.map (Row.renameCells ccs✝) t✝.rows) = List.length t✝.rows
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
groupByRetentive_spec4
[1060, 1]
[1092, 45]
intros t c hc
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ ⊢ ∀ (t : Table sch) (c : η) (hc : Schema.HasCol (c, τ) sch), List.NoDuplicates (getColumn2 (groupByRetentive t c) "key")
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch ⊢ List.NoDuplicates (getColumn2 (groupByRetentive t c) "key")
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
groupByRetentive_spec4
[1060, 1]
[1092, 45]
simp only [groupByRetentive, groupBy, getColumn2]
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch ⊢ List.NoDuplicates (getColumn2 (groupByRetentive t c) "key")
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch ⊢ List.NoDuplicates (List.map (fun r => getValue r "key") (List.map (fun klv => Row.cons (Cell.fromOption (Option.map ULift.up klv.fst)) (Row.cons (Cell.val { rows := klv.snd }) Row.nil)) (List.groupByKey (List.map (fun r => (getValue r c, r)) t.rows))))
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
groupByRetentive_spec4
[1060, 1]
[1092, 45]
rw [List.map_map]
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch ⊢ List.NoDuplicates (List.map (fun r => getValue r "key") (List.map (fun klv => Row.cons (Cell.fromOption (Option.map ULift.up klv.fst)) (Row.cons (Cell.val { rows := klv.snd }) Row.nil)) (List.groupByKey (List.map (fun r => (getValue r c, r)) t.rows))))
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch ⊢ List.NoDuplicates (List.map ((fun r => getValue r "key") ∘ fun klv => Row.cons (Cell.fromOption (Option.map ULift.up klv.fst)) (Row.cons (Cell.val { rows := klv.snd }) Row.nil)) (List.groupByKey (List.map (fun r => (getValue r c, r)) t.rows)))
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
groupByRetentive_spec4
[1060, 1]
[1092, 45]
simp only [Function.comp, getValue]
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch ⊢ List.NoDuplicates (List.map ((fun r => getValue r "key") ∘ fun klv => Row.cons (Cell.fromOption (Option.map ULift.up klv.fst)) (Row.cons (Cell.val { rows := klv.snd }) Row.nil)) (List.groupByKey (List.map (fun r => (getValue r c, r)) t.rows)))
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch ⊢ List.NoDuplicates (List.map ((fun r => Cell.toOption (Row.getCell r Schema.HasCol.hd)) ∘ fun klv => Row.cons (Cell.fromOption (Option.map ULift.up klv.fst)) (Row.cons (Cell.val { rows := klv.snd }) Row.nil)) (List.groupByKey (List.map (fun r => (Cell.toOption (Row.getCell r hc), r)) t.rows)))
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
groupByRetentive_spec4
[1060, 1]
[1092, 45]
conv => rhs lhs apply funext (g := _) _ apply (λ x => Option.map ULift.up x.fst) apply (λ x => Cell.toOption_fromOption _)
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch ⊢ List.NoDuplicates (List.map ((fun r => Cell.toOption (Row.getCell r Schema.HasCol.hd)) ∘ fun klv => Row.cons (Cell.fromOption (Option.map ULift.up klv.fst)) (Row.cons (Cell.val { rows := klv.snd }) Row.nil)) (List.groupByKey (List.map (fun r => (Cell.toOption (Row.getCell r hc), r)) t.rows)))
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch ⊢ List.NoDuplicates (List.map (fun x => Option.map ULift.up x.fst) (List.groupByKey (List.map (fun r => (Cell.toOption (Row.getCell r hc), r)) t.rows)))
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
groupByRetentive_spec4
[1060, 1]
[1092, 45]
conv => rhs lhs apply funext (g := _) _ apply (λ x => Option.map ULift.up ∘ Prod.fst) apply (λ x => rfl)
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch ⊢ List.NoDuplicates (List.map (fun x => Option.map ULift.up x.fst) (List.groupByKey (List.map (fun r => (Cell.toOption (Row.getCell r hc), r)) t.rows)))
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch ⊢ List.NoDuplicates (List.map ((fun x => Option.map ULift.up ∘ Prod.fst) (Row sch)) (List.groupByKey (List.map (fun r => (Cell.toOption (Row.getCell r hc), r)) t.rows)))
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
groupByRetentive_spec4
[1060, 1]
[1092, 45]
rw [←List.map_map]
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch ⊢ List.NoDuplicates (List.map ((fun x => Option.map ULift.up ∘ Prod.fst) (Row sch)) (List.groupByKey (List.map (fun r => (Cell.toOption (Row.getCell r hc), r)) t.rows)))
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch ⊢ List.NoDuplicates (List.map (Option.map ULift.up) (List.map Prod.fst (List.groupByKey (List.map (fun r => (Cell.toOption (Row.getCell r hc), r)) t.rows))))
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
groupByRetentive_spec4
[1060, 1]
[1092, 45]
apply List.no_dups_map_injective
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch ⊢ List.NoDuplicates (List.map (Option.map ULift.up) (List.map Prod.fst (List.groupByKey (List.map (fun r => (Cell.toOption (Row.getCell r hc), r)) t.rows))))
case hf η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch ⊢ Function.injective (Option.map ULift.up) case hxs η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch ⊢ List.NoDuplicates (List.map Prod.fst (List.groupByKey (List.map (fun r => (Cell.toOption (Row.getCell r hc), r)) t.rows)))
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
groupByRetentive_spec4
[1060, 1]
[1092, 45]
. intros x y hxy cases x . cases y . rfl . contradiction . cases y . contradiction . cases hxy; rfl
case hf η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch ⊢ Function.injective (Option.map ULift.up) case hxs η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch ⊢ List.NoDuplicates (List.map Prod.fst (List.groupByKey (List.map (fun r => (Cell.toOption (Row.getCell r hc), r)) t.rows)))
case hxs η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch ⊢ List.NoDuplicates (List.map Prod.fst (List.groupByKey (List.map (fun r => (Cell.toOption (Row.getCell r hc), r)) t.rows)))
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
groupByRetentive_spec4
[1060, 1]
[1092, 45]
. apply List.groupByKey_fsts_no_duplicates
case hxs η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch ⊢ List.NoDuplicates (List.map Prod.fst (List.groupByKey (List.map (fun r => (Cell.toOption (Row.getCell r hc), r)) t.rows)))
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
groupByRetentive_spec4
[1060, 1]
[1092, 45]
intros x y hxy
case hf η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch ⊢ Function.injective (Option.map ULift.up)
case hf η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch x y : Option τ hxy : Option.map ULift.up x = Option.map ULift.up y ⊢ x = y
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
groupByRetentive_spec4
[1060, 1]
[1092, 45]
cases x
case hf η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch x y : Option τ hxy : Option.map ULift.up x = Option.map ULift.up y ⊢ x = y
case hf.none η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch y : Option τ hxy : Option.map ULift.up none = Option.map ULift.up y ⊢ none = y case hf.some η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch y : Option τ val✝ : τ hxy : Option.map ULift.up (some val✝) = Option.map ULift.up y ⊢ some val✝ = y
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
groupByRetentive_spec4
[1060, 1]
[1092, 45]
. cases y . rfl . contradiction
case hf.none η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch y : Option τ hxy : Option.map ULift.up none = Option.map ULift.up y ⊢ none = y case hf.some η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch y : Option τ val✝ : τ hxy : Option.map ULift.up (some val✝) = Option.map ULift.up y ⊢ some val✝ = y
case hf.some η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch y : Option τ val✝ : τ hxy : Option.map ULift.up (some val✝) = Option.map ULift.up y ⊢ some val✝ = y
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
groupByRetentive_spec4
[1060, 1]
[1092, 45]
. cases y . contradiction . cases hxy; rfl
case hf.some η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch y : Option τ val✝ : τ hxy : Option.map ULift.up (some val✝) = Option.map ULift.up y ⊢ some val✝ = y
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
groupByRetentive_spec4
[1060, 1]
[1092, 45]
cases y
case hf.none η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch y : Option τ hxy : Option.map ULift.up none = Option.map ULift.up y ⊢ none = y
case hf.none.none η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch hxy : Option.map ULift.up none = Option.map ULift.up none ⊢ none = none case hf.none.some η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch val✝ : τ hxy : Option.map ULift.up none = Option.map ULift.up (some val✝) ⊢ none = some val✝
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
groupByRetentive_spec4
[1060, 1]
[1092, 45]
. rfl
case hf.none.none η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch hxy : Option.map ULift.up none = Option.map ULift.up none ⊢ none = none case hf.none.some η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch val✝ : τ hxy : Option.map ULift.up none = Option.map ULift.up (some val✝) ⊢ none = some val✝
case hf.none.some η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch val✝ : τ hxy : Option.map ULift.up none = Option.map ULift.up (some val✝) ⊢ none = some val✝
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
groupByRetentive_spec4
[1060, 1]
[1092, 45]
. contradiction
case hf.none.some η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch val✝ : τ hxy : Option.map ULift.up none = Option.map ULift.up (some val✝) ⊢ none = some val✝
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
groupByRetentive_spec4
[1060, 1]
[1092, 45]
rfl
case hf.none.none η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch hxy : Option.map ULift.up none = Option.map ULift.up none ⊢ none = none
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
groupByRetentive_spec4
[1060, 1]
[1092, 45]
contradiction
case hf.none.some η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch val✝ : τ hxy : Option.map ULift.up none = Option.map ULift.up (some val✝) ⊢ none = some val✝
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
groupByRetentive_spec4
[1060, 1]
[1092, 45]
cases y
case hf.some η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch y : Option τ val✝ : τ hxy : Option.map ULift.up (some val✝) = Option.map ULift.up y ⊢ some val✝ = y
case hf.some.none η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch val✝ : τ hxy : Option.map ULift.up (some val✝) = Option.map ULift.up none ⊢ some val✝ = none case hf.some.some η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch val✝¹ val✝ : τ hxy : Option.map ULift.up (some val✝¹) = Option.map ULift.up (some val✝) ⊢ some val✝¹ = some val✝
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
groupByRetentive_spec4
[1060, 1]
[1092, 45]
. contradiction
case hf.some.none η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch val✝ : τ hxy : Option.map ULift.up (some val✝) = Option.map ULift.up none ⊢ some val✝ = none case hf.some.some η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch val✝¹ val✝ : τ hxy : Option.map ULift.up (some val✝¹) = Option.map ULift.up (some val✝) ⊢ some val✝¹ = some val✝
case hf.some.some η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch val✝¹ val✝ : τ hxy : Option.map ULift.up (some val✝¹) = Option.map ULift.up (some val✝) ⊢ some val✝¹ = some val✝
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
groupByRetentive_spec4
[1060, 1]
[1092, 45]
. cases hxy; rfl
case hf.some.some η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch val✝¹ val✝ : τ hxy : Option.map ULift.up (some val✝¹) = Option.map ULift.up (some val✝) ⊢ some val✝¹ = some val✝
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
groupByRetentive_spec4
[1060, 1]
[1092, 45]
contradiction
case hf.some.none η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch val✝ : τ hxy : Option.map ULift.up (some val✝) = Option.map ULift.up none ⊢ some val✝ = none
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
groupByRetentive_spec4
[1060, 1]
[1092, 45]
cases hxy
case hf.some.some η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch val✝¹ val✝ : τ hxy : Option.map ULift.up (some val✝¹) = Option.map ULift.up (some val✝) ⊢ some val✝¹ = some val✝
case hf.some.some.refl η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch val✝ : τ ⊢ some val✝ = some val✝
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
groupByRetentive_spec4
[1060, 1]
[1092, 45]
rfl
case hf.some.some.refl η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch val✝ : τ ⊢ some val✝ = some val✝
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
groupByRetentive_spec4
[1060, 1]
[1092, 45]
apply List.groupByKey_fsts_no_duplicates
case hxs η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch ⊢ List.NoDuplicates (List.map Prod.fst (List.groupByKey (List.map (fun r => (Cell.toOption (Row.getCell r hc), r)) t.rows)))
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
groupBySubtractive_spec4
[1140, 1]
[1172, 45]
intros t c hc
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ ⊢ ∀ (t : Table sch) (c : η) (hc : Schema.HasCol (c, τ) sch), List.NoDuplicates (getColumn2 (groupBySubtractive t c) "key")
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch ⊢ List.NoDuplicates (getColumn2 (groupBySubtractive t c) "key")
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
groupBySubtractive_spec4
[1140, 1]
[1172, 45]
simp only [groupBySubtractive, groupBy, getColumn2]
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch ⊢ List.NoDuplicates (getColumn2 (groupBySubtractive t c) "key")
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch ⊢ List.NoDuplicates (List.map (fun r => getValue r "key") (List.map (fun klv => Row.cons (Cell.fromOption (Option.map ULift.up klv.fst)) (Row.cons (Cell.val { rows := List.map (fun r => Row.removeColumn (Schema.colImpliesName hc) r) klv.snd }) Row.nil)) (List.groupByKey (List.map (fun r => (getValue r c, r)) t.rows))))
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
groupBySubtractive_spec4
[1140, 1]
[1172, 45]
rw [List.map_map]
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch ⊢ List.NoDuplicates (List.map (fun r => getValue r "key") (List.map (fun klv => Row.cons (Cell.fromOption (Option.map ULift.up klv.fst)) (Row.cons (Cell.val { rows := List.map (fun r => Row.removeColumn (Schema.colImpliesName hc) r) klv.snd }) Row.nil)) (List.groupByKey (List.map (fun r => (getValue r c, r)) t.rows))))
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch ⊢ List.NoDuplicates (List.map ((fun r => getValue r "key") ∘ fun klv => Row.cons (Cell.fromOption (Option.map ULift.up klv.fst)) (Row.cons (Cell.val { rows := List.map (fun r => Row.removeColumn (Schema.colImpliesName hc) r) klv.snd }) Row.nil)) (List.groupByKey (List.map (fun r => (getValue r c, r)) t.rows)))
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
groupBySubtractive_spec4
[1140, 1]
[1172, 45]
simp only [Function.comp, getValue]
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch ⊢ List.NoDuplicates (List.map ((fun r => getValue r "key") ∘ fun klv => Row.cons (Cell.fromOption (Option.map ULift.up klv.fst)) (Row.cons (Cell.val { rows := List.map (fun r => Row.removeColumn (Schema.colImpliesName hc) r) klv.snd }) Row.nil)) (List.groupByKey (List.map (fun r => (getValue r c, r)) t.rows)))
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch ⊢ List.NoDuplicates (List.map ((fun r => Cell.toOption (Row.getCell r Schema.HasCol.hd)) ∘ fun klv => Row.cons (Cell.fromOption (Option.map ULift.up klv.fst)) (Row.cons (Cell.val { rows := List.map (fun r => Row.removeColumn (Schema.colImpliesName hc) r) klv.snd }) Row.nil)) (List.groupByKey (List.map (fun r => (Cell.toOption (Row.getCell r hc), r)) t.rows)))
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
groupBySubtractive_spec4
[1140, 1]
[1172, 45]
conv => rhs lhs apply funext (g := _) _ apply (λ x => Option.map ULift.up x.fst) apply (λ x => Cell.toOption_fromOption _)
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch ⊢ List.NoDuplicates (List.map ((fun r => Cell.toOption (Row.getCell r Schema.HasCol.hd)) ∘ fun klv => Row.cons (Cell.fromOption (Option.map ULift.up klv.fst)) (Row.cons (Cell.val { rows := List.map (fun r => Row.removeColumn (Schema.colImpliesName hc) r) klv.snd }) Row.nil)) (List.groupByKey (List.map (fun r => (Cell.toOption (Row.getCell r hc), r)) t.rows)))
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch ⊢ List.NoDuplicates (List.map (fun x => Option.map ULift.up x.fst) (List.groupByKey (List.map (fun r => (Cell.toOption (Row.getCell r hc), r)) t.rows)))
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
groupBySubtractive_spec4
[1140, 1]
[1172, 45]
conv => rhs lhs apply funext (g := _) _ apply (λ x => Option.map ULift.up ∘ Prod.fst) apply (λ x => rfl)
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch ⊢ List.NoDuplicates (List.map (fun x => Option.map ULift.up x.fst) (List.groupByKey (List.map (fun r => (Cell.toOption (Row.getCell r hc), r)) t.rows)))
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch ⊢ List.NoDuplicates (List.map ((fun x => Option.map ULift.up ∘ Prod.fst) (Row sch)) (List.groupByKey (List.map (fun r => (Cell.toOption (Row.getCell r hc), r)) t.rows)))
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
groupBySubtractive_spec4
[1140, 1]
[1172, 45]
rw [←List.map_map]
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch ⊢ List.NoDuplicates (List.map ((fun x => Option.map ULift.up ∘ Prod.fst) (Row sch)) (List.groupByKey (List.map (fun r => (Cell.toOption (Row.getCell r hc), r)) t.rows)))
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch ⊢ List.NoDuplicates (List.map (Option.map ULift.up) (List.map Prod.fst (List.groupByKey (List.map (fun r => (Cell.toOption (Row.getCell r hc), r)) t.rows))))
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
groupBySubtractive_spec4
[1140, 1]
[1172, 45]
apply List.no_dups_map_injective
η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch ⊢ List.NoDuplicates (List.map (Option.map ULift.up) (List.map Prod.fst (List.groupByKey (List.map (fun r => (Cell.toOption (Row.getCell r hc), r)) t.rows))))
case hf η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch ⊢ Function.injective (Option.map ULift.up) case hxs η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch ⊢ List.NoDuplicates (List.map Prod.fst (List.groupByKey (List.map (fun r => (Cell.toOption (Row.getCell r hc), r)) t.rows)))
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
groupBySubtractive_spec4
[1140, 1]
[1172, 45]
. intros x y hxy cases x . cases y . rfl . contradiction . cases y . contradiction . cases hxy; rfl
case hf η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch ⊢ Function.injective (Option.map ULift.up) case hxs η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch ⊢ List.NoDuplicates (List.map Prod.fst (List.groupByKey (List.map (fun r => (Cell.toOption (Row.getCell r hc), r)) t.rows)))
case hxs η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch ⊢ List.NoDuplicates (List.map Prod.fst (List.groupByKey (List.map (fun r => (Cell.toOption (Row.getCell r hc), r)) t.rows)))
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
groupBySubtractive_spec4
[1140, 1]
[1172, 45]
. apply List.groupByKey_fsts_no_duplicates
case hxs η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch ⊢ List.NoDuplicates (List.map Prod.fst (List.groupByKey (List.map (fun r => (Cell.toOption (Row.getCell r hc), r)) t.rows)))
no goals
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
groupBySubtractive_spec4
[1140, 1]
[1172, 45]
intros x y hxy
case hf η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch ⊢ Function.injective (Option.map ULift.up)
case hf η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch x y : Option τ hxy : Option.map ULift.up x = Option.map ULift.up y ⊢ x = y
https://github.com/jrr6/lean-tables.git
7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712
Table/Proofs.lean
groupBySubtractive_spec4
[1140, 1]
[1172, 45]
cases x
case hf η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch x y : Option τ hxy : Option.map ULift.up x = Option.map ULift.up y ⊢ x = y
case hf.none η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch y : Option τ hxy : Option.map ULift.up none = Option.map ULift.up y ⊢ none = y case hf.some η : Type u_η dec_η : DecidableEq η sch : Schema τ : Type u_1 inst : DecidableEq τ t : Table sch c : η hc : Schema.HasCol (c, τ) sch y : Option τ val✝ : τ hxy : Option.map ULift.up (some val✝) = Option.map ULift.up y ⊢ some val✝ = y