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 | selectColumns2_spec4 | [385, 1] | [390, 24] | simp only [nrows, selectColumns2, Schema.length_eq_List_length] | η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
ns : List (Fin (ncols t))
⊢ nrows (selectColumns2 t ns) = nrows t | η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
ns : List (Fin (ncols t))
⊢ List.length (List.map (Row.nths ns) t.rows) = List.length t.rows |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | selectColumns2_spec4 | [385, 1] | [390, 24] | apply List.length_map | η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
ns : List (Fin (ncols t))
⊢ List.length (List.map (Row.nths ns) t.rows) = List.length t.rows | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | selectColumns3_spec1 | [394, 1] | [405, 16] | intros t cs | η : Type u_η
dec_η : DecidableEq η
sch : Schema
⊢ ∀ (t : Table sch) (cs : List (CertifiedHeader sch)), header (selectColumns3 t cs) = List.map (Prod.fst ∘ Sigma.fst) cs | η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
cs : List (CertifiedHeader sch)
⊢ header (selectColumns3 t cs) = List.map (Prod.fst ∘ Sigma.fst) cs |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | selectColumns3_spec1 | [394, 1] | [405, 16] | simp only [header, selectColumns3, Schema.names] | η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
cs : List (CertifiedHeader sch)
⊢ header (selectColumns3 t cs) = List.map (Prod.fst ∘ Sigma.fst) cs | η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
cs : List (CertifiedHeader sch)
⊢ List.map Prod.fst (Schema.fromCHeaders cs) = List.map (Prod.fst ∘ Sigma.fst) cs |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | selectColumns3_spec1 | [394, 1] | [405, 16] | induction cs with
| nil => simp only [Schema.pick, List.map]
| cons c cs ih =>
simp only [Schema.pick, List.map, List.cons.injEq]
apply And.intro
. simp only [Function.comp, Schema.lookup_fst_eq_nm, CertifiedName.val]
. exact ih | η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
cs : List (CertifiedHeader sch)
⊢ List.map Prod.fst (Schema.fromCHeaders cs) = List.map (Prod.fst ∘ Sigma.fst) cs | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | selectColumns3_spec1 | [394, 1] | [405, 16] | simp only [Schema.pick, List.map] | case nil
η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
⊢ List.map Prod.fst (Schema.fromCHeaders []) = List.map (Prod.fst ∘ Sigma.fst) [] | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | selectColumns3_spec1 | [394, 1] | [405, 16] | simp only [Schema.pick, List.map, List.cons.injEq] | case cons
η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
c : CertifiedHeader sch
cs : List (CertifiedHeader sch)
ih : List.map Prod.fst (Schema.fromCHeaders cs) = List.map (Prod.fst ∘ Sigma.fst) cs
⊢ List.map Prod.fst (Schema.fromCHeaders (c :: cs)) = List.map (Prod.fst ∘ Sigma.fst) (c :: cs) | case cons
η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
c : CertifiedHeader sch
cs : List (CertifiedHeader sch)
ih : List.map Prod.fst (Schema.fromCHeaders cs) = List.map (Prod.fst ∘ Sigma.fst) cs
⊢ c.fst.fst = (Prod.fst ∘ Sigma.fst) c ∧
List.map Prod.fst (Schema.map Sigma.fst cs) = List.map (Prod.fst ∘ Sigma.fst) cs |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | selectColumns3_spec1 | [394, 1] | [405, 16] | apply And.intro | case cons
η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
c : CertifiedHeader sch
cs : List (CertifiedHeader sch)
ih : List.map Prod.fst (Schema.fromCHeaders cs) = List.map (Prod.fst ∘ Sigma.fst) cs
⊢ c.fst.fst = (Prod.fst ∘ Sigma.fst) c ∧
List.map Prod.fst (Schema.map Sigma.fst cs) = List.map (Prod.fst ∘ Sigma.fst) cs | case cons.left
η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
c : CertifiedHeader sch
cs : List (CertifiedHeader sch)
ih : List.map Prod.fst (Schema.fromCHeaders cs) = List.map (Prod.fst ∘ Sigma.fst) cs
⊢ c.fst.fst = (Prod.fst ∘ Sigma.fst) c
case cons.right
η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
c : CertifiedHeader sch
cs : List (CertifiedHeader sch)
ih : List.map Prod.fst (Schema.fromCHeaders cs) = List.map (Prod.fst ∘ Sigma.fst) cs
⊢ List.map Prod.fst (Schema.map Sigma.fst cs) = List.map (Prod.fst ∘ Sigma.fst) cs |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | selectColumns3_spec1 | [394, 1] | [405, 16] | . simp only [Function.comp, Schema.lookup_fst_eq_nm, CertifiedName.val] | case cons.left
η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
c : CertifiedHeader sch
cs : List (CertifiedHeader sch)
ih : List.map Prod.fst (Schema.fromCHeaders cs) = List.map (Prod.fst ∘ Sigma.fst) cs
⊢ c.fst.fst = (Prod.fst ∘ Sigma.fst) c
case cons.right
η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
c : CertifiedHeader sch
cs : List (CertifiedHeader sch)
ih : List.map Prod.fst (Schema.fromCHeaders cs) = List.map (Prod.fst ∘ Sigma.fst) cs
⊢ List.map Prod.fst (Schema.map Sigma.fst cs) = List.map (Prod.fst ∘ Sigma.fst) cs | case cons.right
η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
c : CertifiedHeader sch
cs : List (CertifiedHeader sch)
ih : List.map Prod.fst (Schema.fromCHeaders cs) = List.map (Prod.fst ∘ Sigma.fst) cs
⊢ List.map Prod.fst (Schema.map Sigma.fst cs) = List.map (Prod.fst ∘ Sigma.fst) cs |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | selectColumns3_spec1 | [394, 1] | [405, 16] | . exact ih | case cons.right
η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
c : CertifiedHeader sch
cs : List (CertifiedHeader sch)
ih : List.map Prod.fst (Schema.fromCHeaders cs) = List.map (Prod.fst ∘ Sigma.fst) cs
⊢ List.map Prod.fst (Schema.map Sigma.fst cs) = List.map (Prod.fst ∘ Sigma.fst) cs | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | selectColumns3_spec1 | [394, 1] | [405, 16] | simp only [Function.comp, Schema.lookup_fst_eq_nm, CertifiedName.val] | case cons.left
η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
c : CertifiedHeader sch
cs : List (CertifiedHeader sch)
ih : List.map Prod.fst (Schema.fromCHeaders cs) = List.map (Prod.fst ∘ Sigma.fst) cs
⊢ c.fst.fst = (Prod.fst ∘ Sigma.fst) c | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | selectColumns3_spec1 | [394, 1] | [405, 16] | exact ih | case cons.right
η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
c : CertifiedHeader sch
cs : List (CertifiedHeader sch)
ih : List.map Prod.fst (Schema.fromCHeaders cs) = List.map (Prod.fst ∘ Sigma.fst) cs
⊢ List.map Prod.fst (Schema.map Sigma.fst cs) = List.map (Prod.fst ∘ Sigma.fst) cs | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | selectColumns3_spec2 | [407, 1] | [417, 44] | intro t cs c | η : Type u_η
dec_η : DecidableEq η
sch : Schema
⊢ ∀ (t : Table sch) (cs : List (CertifiedHeader sch)) (c : CertifiedName (schema (selectColumns3 t cs))),
Schema.lookupType (schema t) { fst := c.fst, snd := Schema.hasNameOfFromCHeaders c.snd } =
Schema.lookupType (schema (selectColumns3 t cs)) c | η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
cs : List (CertifiedHeader sch)
c : CertifiedName (schema (selectColumns3 t cs))
⊢ Schema.lookupType (schema t) { fst := c.fst, snd := Schema.hasNameOfFromCHeaders c.snd } =
Schema.lookupType (schema (selectColumns3 t cs)) c |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | selectColumns3_spec2 | [407, 1] | [417, 44] | unfold schema | η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
cs : List (CertifiedHeader sch)
c : CertifiedName (schema (selectColumns3 t cs))
⊢ Schema.lookupType (schema t) { fst := c.fst, snd := Schema.hasNameOfFromCHeaders c.snd } =
Schema.lookupType (schema (selectColumns3 t cs)) c | η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
cs : List (CertifiedHeader sch)
c : CertifiedName (schema (selectColumns3 t cs))
⊢ Schema.lookupType sch { fst := c.fst, snd := Schema.hasNameOfFromCHeaders c.snd } =
Schema.lookupType (Schema.fromCHeaders cs) c |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | selectColumns3_spec2 | [407, 1] | [417, 44] | unfold Schema.fromCHeaders | η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
cs : List (CertifiedHeader sch)
c : CertifiedName (schema (selectColumns3 t cs))
⊢ Schema.lookupType sch { fst := c.fst, snd := Schema.hasNameOfFromCHeaders c.snd } =
Schema.lookupType (Schema.fromCHeaders cs) c | η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
cs : List (CertifiedHeader sch)
c : CertifiedName (schema (selectColumns3 t cs))
⊢ Schema.lookupType sch { fst := c.fst, snd := Schema.hasNameOfFromCHeaders c.snd } =
Schema.lookupType (Schema.map Sigma.fst cs) c |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | selectColumns3_spec2 | [407, 1] | [417, 44] | simp only [schema] at c | η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
cs : List (CertifiedHeader sch)
c : CertifiedName (schema (selectColumns3 t cs))
⊢ Schema.lookupType sch { fst := c.fst, snd := Schema.hasNameOfFromCHeaders c.snd } =
Schema.lookupType (Schema.map Sigma.fst cs) c | η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
cs : List (CertifiedHeader sch)
c : CertifiedName (Schema.fromCHeaders cs)
⊢ Schema.lookupType sch { fst := c.fst, snd := Schema.hasNameOfFromCHeaders c.snd } =
Schema.lookupType (Schema.map Sigma.fst cs) c |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | selectColumns3_spec2 | [407, 1] | [417, 44] | apply Schema.lookupTypeFromCHeadersUnique | η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
cs : List (CertifiedHeader sch)
c : CertifiedName (Schema.fromCHeaders cs)
⊢ Schema.lookupType sch { fst := c.fst, snd := Schema.hasNameOfFromCHeaders c.snd } =
Schema.lookupType (Schema.map Sigma.fst cs) c | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | selectColumns3_spec3 | [419, 1] | [424, 24] | intro t cs | η : Type u_η
dec_η : DecidableEq η
sch : Schema
⊢ ∀ (t : Table sch) (cs : List (CertifiedHeader sch)), nrows (selectColumns3 t cs) = nrows t | η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
cs : List (CertifiedHeader sch)
⊢ nrows (selectColumns3 t cs) = nrows t |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | selectColumns3_spec3 | [419, 1] | [424, 24] | simp only [nrows, selectColumns3, Schema.length_eq_List_length] | η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
cs : List (CertifiedHeader sch)
⊢ nrows (selectColumns3 t cs) = nrows t | η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
cs : List (CertifiedHeader sch)
⊢ List.length (List.map (fun r => Row.pick r cs) t.rows) = List.length t.rows |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | selectColumns3_spec3 | [419, 1] | [424, 24] | apply List.length_map | η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
cs : List (CertifiedHeader sch)
⊢ List.length (List.map (fun r => Row.pick r cs) t.rows) = List.length t.rows | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | head_spec2 | [433, 1] | [450, 15] | intros t z h | η : Type u_η
dec_η : DecidableEq η
sch : Schema
⊢ ∀ (t : Table sch) (z : { z // Int.abs z < nrows t }), z.val ≥ 0 → Int.ofNat (nrows (head t z.val)) = z.val | η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
z : { z // Int.abs z < nrows t }
h : z.val ≥ 0
⊢ Int.ofNat (nrows (head t z.val)) = z.val |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | head_spec2 | [433, 1] | [450, 15] | cases z with | mk z prop =>
simp only [head]
have h_not_neg : ¬ (z < 0) := by
intro hcontra
cases z with
| ofNat n => contradiction
| negSucc n => contradiction
simp only [ite_false, h_not_neg]
simp only [List.take, nrows, Schema.length_eq_List_length]
rw [List.length_take]
. exact Int.toNat_of_ofNat_inj z h
. unfold nrows at prop
rw [Int.abs_of_nonneg_eq_toNat] at prop
. exact Schema.length_eq_List_length ▸ prop
. exact h | η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
z : { z // Int.abs z < nrows t }
h : z.val ≥ 0
⊢ Int.ofNat (nrows (head t z.val)) = z.val | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | head_spec2 | [433, 1] | [450, 15] | simp only [head] | case mk
η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
z : Int
prop : Int.abs z < nrows t
h : { val := z, property := prop }.val ≥ 0
⊢ Int.ofNat (nrows (head t { val := z, property := prop }.val)) = { val := z, property := prop }.val | case mk
η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
z : Int
prop : Int.abs z < nrows t
h : { val := z, property := prop }.val ≥ 0
⊢ Int.ofNat (nrows { rows := if z < 0 then List.dropLastN (Int.abs z) t.rows else List.take (Int.toNat z) t.rows }) = z |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | head_spec2 | [433, 1] | [450, 15] | have h_not_neg : ¬ (z < 0) := by
intro hcontra
cases z with
| ofNat n => contradiction
| negSucc n => contradiction | case mk
η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
z : Int
prop : Int.abs z < nrows t
h : { val := z, property := prop }.val ≥ 0
⊢ Int.ofNat (nrows { rows := if z < 0 then List.dropLastN (Int.abs z) t.rows else List.take (Int.toNat z) t.rows }) = z | case mk
η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
z : Int
prop : Int.abs z < nrows t
h : { val := z, property := prop }.val ≥ 0
h_not_neg : ¬z < 0
⊢ Int.ofNat (nrows { rows := if z < 0 then List.dropLastN (Int.abs z) t.rows else List.take (Int.toNat z) t.rows }) = z |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | head_spec2 | [433, 1] | [450, 15] | simp only [ite_false, h_not_neg] | case mk
η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
z : Int
prop : Int.abs z < nrows t
h : { val := z, property := prop }.val ≥ 0
h_not_neg : ¬z < 0
⊢ Int.ofNat (nrows { rows := if z < 0 then List.dropLastN (Int.abs z) t.rows else List.take (Int.toNat z) t.rows }) = z | case mk
η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
z : Int
prop : Int.abs z < nrows t
h : { val := z, property := prop }.val ≥ 0
h_not_neg : ¬z < 0
⊢ Int.ofNat (nrows { rows := List.take (Int.toNat z) t.rows }) = z |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | head_spec2 | [433, 1] | [450, 15] | simp only [List.take, nrows, Schema.length_eq_List_length] | case mk
η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
z : Int
prop : Int.abs z < nrows t
h : { val := z, property := prop }.val ≥ 0
h_not_neg : ¬z < 0
⊢ Int.ofNat (nrows { rows := List.take (Int.toNat z) t.rows }) = z | case mk
η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
z : Int
prop : Int.abs z < nrows t
h : { val := z, property := prop }.val ≥ 0
h_not_neg : ¬z < 0
⊢ Int.ofNat (List.length (List.take (Int.toNat z) t.rows)) = z |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | head_spec2 | [433, 1] | [450, 15] | rw [List.length_take] | case mk
η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
z : Int
prop : Int.abs z < nrows t
h : { val := z, property := prop }.val ≥ 0
h_not_neg : ¬z < 0
⊢ Int.ofNat (List.length (List.take (Int.toNat z) t.rows)) = z | case mk
η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
z : Int
prop : Int.abs z < nrows t
h : { val := z, property := prop }.val ≥ 0
h_not_neg : ¬z < 0
⊢ Int.ofNat (Int.toNat z) = z
case mk.h
η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
z : Int
prop : Int.abs z < nrows t
h : { val := z, property := prop }.val ≥ 0
h_not_neg : ¬z < 0
⊢ Int.toNat z < List.length t.rows |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | head_spec2 | [433, 1] | [450, 15] | . exact Int.toNat_of_ofNat_inj z h | case mk
η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
z : Int
prop : Int.abs z < nrows t
h : { val := z, property := prop }.val ≥ 0
h_not_neg : ¬z < 0
⊢ Int.ofNat (Int.toNat z) = z
case mk.h
η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
z : Int
prop : Int.abs z < nrows t
h : { val := z, property := prop }.val ≥ 0
h_not_neg : ¬z < 0
⊢ Int.toNat z < List.length t.rows | case mk.h
η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
z : Int
prop : Int.abs z < nrows t
h : { val := z, property := prop }.val ≥ 0
h_not_neg : ¬z < 0
⊢ Int.toNat z < List.length t.rows |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | head_spec2 | [433, 1] | [450, 15] | . unfold nrows at prop
rw [Int.abs_of_nonneg_eq_toNat] at prop
. exact Schema.length_eq_List_length ▸ prop
. exact h | case mk.h
η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
z : Int
prop : Int.abs z < nrows t
h : { val := z, property := prop }.val ≥ 0
h_not_neg : ¬z < 0
⊢ Int.toNat z < List.length t.rows | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | head_spec2 | [433, 1] | [450, 15] | intro hcontra | η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
z : Int
prop : Int.abs z < nrows t
h : { val := z, property := prop }.val ≥ 0
⊢ ¬z < 0 | η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
z : Int
prop : Int.abs z < nrows t
h : { val := z, property := prop }.val ≥ 0
hcontra : z < 0
⊢ False |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | head_spec2 | [433, 1] | [450, 15] | cases z with
| ofNat n => contradiction
| negSucc n => contradiction | η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
z : Int
prop : Int.abs z < nrows t
h : { val := z, property := prop }.val ≥ 0
hcontra : z < 0
⊢ False | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | head_spec2 | [433, 1] | [450, 15] | contradiction | case ofNat
η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
n : Nat
prop : Int.abs (Int.ofNat n) < nrows t
h : { val := Int.ofNat n, property := prop }.val ≥ 0
hcontra : Int.ofNat n < 0
⊢ False | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | head_spec2 | [433, 1] | [450, 15] | contradiction | case negSucc
η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
n : Nat
prop : Int.abs (Int.negSucc n) < nrows t
h : { val := Int.negSucc n, property := prop }.val ≥ 0
hcontra : Int.negSucc n < 0
⊢ False | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | head_spec2 | [433, 1] | [450, 15] | exact Int.toNat_of_ofNat_inj z h | case mk
η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
z : Int
prop : Int.abs z < nrows t
h : { val := z, property := prop }.val ≥ 0
h_not_neg : ¬z < 0
⊢ Int.ofNat (Int.toNat z) = z | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | head_spec2 | [433, 1] | [450, 15] | unfold nrows at prop | case mk.h
η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
z : Int
prop : Int.abs z < nrows t
h : { val := z, property := prop }.val ≥ 0
h_not_neg : ¬z < 0
⊢ Int.toNat z < List.length t.rows | case mk.h
η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
z : Int
prop : Int.abs z < Schema.length t.rows
h : { val := z, property := prop }.val ≥ 0
h_not_neg : ¬z < 0
⊢ Int.toNat z < List.length t.rows |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | head_spec2 | [433, 1] | [450, 15] | rw [Int.abs_of_nonneg_eq_toNat] at prop | case mk.h
η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
z : Int
prop : Int.abs z < Schema.length t.rows
h : { val := z, property := prop }.val ≥ 0
h_not_neg : ¬z < 0
⊢ Int.toNat z < List.length t.rows | case mk.h
η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
z : Int
prop✝ : Int.abs z < Schema.length t.rows
prop : Int.toNat z < Schema.length t.rows
h : { val := z, property := prop✝ }.val ≥ 0
h_not_neg : ¬z < 0
⊢ Int.toNat z < List.length t.rows
case mk.h.a
η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
z : Int
prop : Int.abs z < Schema.length t.rows
h : { val := z, property := prop }.val ≥ 0
h_not_neg : ¬z < 0
⊢ z ≥ 0 |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | head_spec2 | [433, 1] | [450, 15] | . exact Schema.length_eq_List_length ▸ prop | case mk.h
η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
z : Int
prop✝ : Int.abs z < Schema.length t.rows
prop : Int.toNat z < Schema.length t.rows
h : { val := z, property := prop✝ }.val ≥ 0
h_not_neg : ¬z < 0
⊢ Int.toNat z < List.length t.rows
case mk.h.a
η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
z : Int
prop : Int.abs z < Schema.length t.rows
h : { val := z, property := prop }.val ≥ 0
h_not_neg : ¬z < 0
⊢ z ≥ 0 | case mk.h.a
η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
z : Int
prop : Int.abs z < Schema.length t.rows
h : { val := z, property := prop }.val ≥ 0
h_not_neg : ¬z < 0
⊢ z ≥ 0 |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | head_spec2 | [433, 1] | [450, 15] | . exact h | case mk.h.a
η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
z : Int
prop : Int.abs z < Schema.length t.rows
h : { val := z, property := prop }.val ≥ 0
h_not_neg : ¬z < 0
⊢ z ≥ 0 | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | head_spec2 | [433, 1] | [450, 15] | exact Schema.length_eq_List_length ▸ prop | case mk.h
η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
z : Int
prop✝ : Int.abs z < Schema.length t.rows
prop : Int.toNat z < Schema.length t.rows
h : { val := z, property := prop✝ }.val ≥ 0
h_not_neg : ¬z < 0
⊢ Int.toNat z < List.length t.rows | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | head_spec2 | [433, 1] | [450, 15] | exact h | case mk.h.a
η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
z : Int
prop : Int.abs z < Schema.length t.rows
h : { val := z, property := prop }.val ≥ 0
h_not_neg : ¬z < 0
⊢ z ≥ 0 | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | head_spec3 | [455, 1] | [466, 13] | intros t z h | η : Type u_η
dec_η : DecidableEq η
sch : Schema
⊢ ∀ (t : Table sch) (z : { z // Int.abs z < nrows t }), z.val < 0 → nrows (head t z.val) = nrows t - Int.abs z.val | η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
z : { z // Int.abs z < nrows t }
h : z.val < 0
⊢ nrows (head t z.val) = nrows t - Int.abs z.val |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | head_spec3 | [455, 1] | [466, 13] | cases z with | mk z prop =>
simp only at h
simp only [nrows, Schema.length_eq_List_length] at prop
simp only [head, nrows, List.dropLastN, Function.comp, h,
Schema.length_eq_List_length, ite_true]
rw [List.length_reverse, List.length_drop, List.length_reverse]
rw [List.length_reverse]
exact prop | η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
z : { z // Int.abs z < nrows t }
h : z.val < 0
⊢ nrows (head t z.val) = nrows t - Int.abs z.val | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | head_spec3 | [455, 1] | [466, 13] | simp only at h | case mk
η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
z : Int
prop : Int.abs z < nrows t
h : { val := z, property := prop }.val < 0
⊢ nrows (head t { val := z, property := prop }.val) = nrows t - Int.abs { val := z, property := prop }.val | case mk
η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
z : Int
prop : Int.abs z < nrows t
h : z < 0
⊢ nrows (head t { val := z, property := prop }.val) = nrows t - Int.abs { val := z, property := prop }.val |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | head_spec3 | [455, 1] | [466, 13] | simp only [nrows, Schema.length_eq_List_length] at prop | case mk
η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
z : Int
prop : Int.abs z < nrows t
h : z < 0
⊢ nrows (head t { val := z, property := prop }.val) = nrows t - Int.abs { val := z, property := prop }.val | case mk
η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
z : Int
prop✝ : Int.abs z < nrows t
h : z < 0
prop : Int.abs z < List.length t.rows
⊢ nrows (head t { val := z, property := prop✝ }.val) = nrows t - Int.abs { val := z, property := prop✝ }.val |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | head_spec3 | [455, 1] | [466, 13] | simp only [head, nrows, List.dropLastN, Function.comp, h,
Schema.length_eq_List_length, ite_true] | case mk
η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
z : Int
prop✝ : Int.abs z < nrows t
h : z < 0
prop : Int.abs z < List.length t.rows
⊢ nrows (head t { val := z, property := prop✝ }.val) = nrows t - Int.abs { val := z, property := prop✝ }.val | case mk
η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
z : Int
prop✝ : Int.abs z < nrows t
h : z < 0
prop : Int.abs z < List.length t.rows
⊢ List.length (List.reverse (List.drop (Int.abs z) (List.reverse t.rows))) = List.length t.rows - Int.abs z |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | head_spec3 | [455, 1] | [466, 13] | rw [List.length_reverse, List.length_drop, List.length_reverse] | case mk
η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
z : Int
prop✝ : Int.abs z < nrows t
h : z < 0
prop : Int.abs z < List.length t.rows
⊢ List.length (List.reverse (List.drop (Int.abs z) (List.reverse t.rows))) = List.length t.rows - Int.abs z | case mk.a
η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
z : Int
prop✝ : Int.abs z < nrows t
h : z < 0
prop : Int.abs z < List.length t.rows
⊢ Int.abs z < List.length (List.reverse t.rows) |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | head_spec3 | [455, 1] | [466, 13] | rw [List.length_reverse] | case mk.a
η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
z : Int
prop✝ : Int.abs z < nrows t
h : z < 0
prop : Int.abs z < List.length t.rows
⊢ Int.abs z < List.length (List.reverse t.rows) | case mk.a
η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
z : Int
prop✝ : Int.abs z < nrows t
h : z < 0
prop : Int.abs z < List.length t.rows
⊢ Int.abs z < List.length t.rows |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | head_spec3 | [455, 1] | [466, 13] | exact prop | case mk.a
η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
z : Int
prop✝ : Int.abs z < nrows t
h : z < 0
prop : Int.abs z < List.length t.rows
⊢ Int.abs z < List.length t.rows | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | dropColumn_spec1 | [476, 1] | [480, 24] | intros | η : Type u_η
dec_η : DecidableEq η
sch : Schema
⊢ ∀ (t : Table sch) (c : η) (hc : Schema.HasName c sch), nrows (dropColumn t c) = nrows t | η : Type u_η
dec_η : DecidableEq η
sch : Schema
t✝ : Table sch
c✝ : η
hc✝ : Schema.HasName c✝ sch
⊢ nrows (dropColumn t✝ c✝) = nrows t✝ |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | dropColumn_spec1 | [476, 1] | [480, 24] | simp only [nrows, dropColumn, Schema.length_eq_List_length] | η : Type u_η
dec_η : DecidableEq η
sch : Schema
t✝ : Table sch
c✝ : η
hc✝ : Schema.HasName c✝ sch
⊢ nrows (dropColumn t✝ c✝) = nrows t✝ | η : Type u_η
dec_η : DecidableEq η
sch : Schema
t✝ : Table sch
c✝ : η
hc✝ : Schema.HasName c✝ sch
⊢ List.length (List.map (Row.removeColumn hc✝) t✝.rows) = List.length t✝.rows |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | dropColumn_spec1 | [476, 1] | [480, 24] | apply List.length_map | η : Type u_η
dec_η : DecidableEq η
sch : Schema
t✝ : Table sch
c✝ : η
hc✝ : Schema.HasName c✝ sch
⊢ List.length (List.map (Row.removeColumn hc✝) t✝.rows) = List.length t✝.rows | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | dropColumn_spec2_unique | [488, 1] | [527, 19] | intro hsch t c hc | η : Type u_η
dec_η : DecidableEq η
sch : Schema
⊢ Schema.Unique sch →
∀ (t : Table sch) (c : η) (hc : Schema.HasName c sch), header (dropColumn t c) = List.removeAllEq (header t) [c] | η : Type u_η
dec_η : DecidableEq η
sch : Schema
hsch : Schema.Unique sch
t : Table sch
c : η
hc : Schema.HasName c sch
⊢ header (dropColumn t c) = List.removeAllEq (header t) [c] |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | dropColumn_spec2_unique | [488, 1] | [527, 19] | simp only [List.removeAllEq, header] | η : Type u_η
dec_η : DecidableEq η
sch : Schema
hsch : Schema.Unique sch
t : Table sch
c : η
hc : Schema.HasName c sch
⊢ header (dropColumn t c) = List.removeAllEq (header t) [c] | η : Type u_η
dec_η : DecidableEq η
sch : Schema
hsch : Schema.Unique sch
t : Table sch
c : η
hc : Schema.HasName c sch
⊢ Schema.names (Schema.removeName sch hc) = List.filter (fun x => decide ¬x ∈ [c]) (Schema.names sch) |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | dropColumn_spec2_unique | [488, 1] | [527, 19] | unfold Schema.Unique at hsch | η : Type u_η
dec_η : DecidableEq η
sch : Schema
hsch : Schema.Unique sch
t : Table sch
c : η
hc : Schema.HasName c sch
⊢ Schema.names (Schema.removeName sch hc) = List.filter (fun x => decide ¬x ∈ [c]) (Schema.names sch) | η : Type u_η
dec_η : DecidableEq η
sch : Schema
hsch : List.Unique (Schema.names sch)
t : Table sch
c : η
hc : Schema.HasName c sch
⊢ Schema.names (Schema.removeName sch hc) = List.filter (fun x => decide ¬x ∈ [c]) (Schema.names sch) |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | dropColumn_spec2_unique | [488, 1] | [527, 19] | induction hc with
| @hd nm s' τ =>
simp only [List.filter, List.notElem, List.elem]
cases hsch with | cons hnmem hu =>
simp only at hnmem
have : (decide (nm ∉ [nm])) = false :=
by simp only [decide_not, List.mem_singleton_iff, decide_True,
decide_False, not]
rw [this]
simp only
simp only [Schema.names, List.map]
have : List.filter (λ x => x ∉ [nm]) (List.map Prod.fst s')
= List.removeAllEq (List.map Prod.fst s') [nm] := rfl
rw [this]
rw [List.removeAllEq_singleton_nonelem_eq]
exact hnmem
| @tl hdr nm s' h ih =>
simp only [Schema.names, List.map]
cases hdr with | mk nm₁ τ₁ =>
cases Decidable.em (nm₁ = nm) with
| inl heq =>
rw [heq] at hsch
cases hsch with | cons hnmem hu =>
simp only at hnmem
have := Schema.map_eq_List_map ▸ Schema.mem_map_of_HasName _ _ h
contradiction
| inr hneq =>
rw [←List.removeAllEq]
rw [List.removeAllEq_singleton_hd_neq]
. congr
apply ih
. cases hsch; assumption
. exact Table.mk []
. exact hneq | η : Type u_η
dec_η : DecidableEq η
sch : Schema
hsch : List.Unique (Schema.names sch)
t : Table sch
c : η
hc : Schema.HasName c sch
⊢ Schema.names (Schema.removeName sch hc) = List.filter (fun x => decide ¬x ∈ [c]) (Schema.names sch) | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | dropColumn_spec2_unique | [488, 1] | [527, 19] | simp only [List.filter, List.notElem, List.elem] | case hd
η : Type u_η
dec_η : DecidableEq η
sch : Schema
c nm : η
s' : Schema
τ : Type u_1
hsch : List.Unique (Schema.names ((nm, τ) :: s'))
t : Table ((nm, τ) :: s')
⊢ Schema.names (Schema.removeName ((nm, τ) :: s') Schema.HasName.hd) =
List.filter (fun x => decide ¬x ∈ [nm]) (Schema.names ((nm, τ) :: s')) | case hd
η : Type u_η
dec_η : DecidableEq η
sch : Schema
c nm : η
s' : Schema
τ : Type u_1
hsch : List.Unique (Schema.names ((nm, τ) :: s'))
t : Table ((nm, τ) :: s')
⊢ Schema.names (Schema.removeName ((nm, τ) :: s') Schema.HasName.hd) =
match decide ¬nm ∈ [nm] with
| true => nm :: List.filter (fun x => decide ¬x ∈ [nm]) (List.map Prod.fst s')
| false => List.filter (fun x => decide ¬x ∈ [nm]) (List.map Prod.fst s') |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | dropColumn_spec2_unique | [488, 1] | [527, 19] | cases hsch with | cons hnmem hu =>
simp only at hnmem
have : (decide (nm ∉ [nm])) = false :=
by simp only [decide_not, List.mem_singleton_iff, decide_True,
decide_False, not]
rw [this]
simp only
simp only [Schema.names, List.map]
have : List.filter (λ x => x ∉ [nm]) (List.map Prod.fst s')
= List.removeAllEq (List.map Prod.fst s') [nm] := rfl
rw [this]
rw [List.removeAllEq_singleton_nonelem_eq]
exact hnmem | case hd
η : Type u_η
dec_η : DecidableEq η
sch : Schema
c nm : η
s' : Schema
τ : Type u_1
hsch : List.Unique (Schema.names ((nm, τ) :: s'))
t : Table ((nm, τ) :: s')
⊢ Schema.names (Schema.removeName ((nm, τ) :: s') Schema.HasName.hd) =
match decide ¬nm ∈ [nm] with
| true => nm :: List.filter (fun x => decide ¬x ∈ [nm]) (List.map Prod.fst s')
| false => List.filter (fun x => decide ¬x ∈ [nm]) (List.map Prod.fst s') | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | dropColumn_spec2_unique | [488, 1] | [527, 19] | simp only at hnmem | case hd.cons
η : Type u_η
dec_η : DecidableEq η
sch : Schema
c nm : η
s' : Schema
τ : Type u_1
t : Table ((nm, τ) :: s')
hu : List.Unique (List.map Prod.fst s')
hnmem : ¬(nm, τ).fst ∈ List.map Prod.fst s'
⊢ Schema.names (Schema.removeName ((nm, τ) :: s') Schema.HasName.hd) =
match decide ¬nm ∈ [nm] with
| true => nm :: List.filter (fun x => decide ¬x ∈ [nm]) (List.map Prod.fst s')
| false => List.filter (fun x => decide ¬x ∈ [nm]) (List.map Prod.fst s') | case hd.cons
η : Type u_η
dec_η : DecidableEq η
sch : Schema
c nm : η
s' : Schema
τ : Type u_1
t : Table ((nm, τ) :: s')
hu : List.Unique (List.map Prod.fst s')
hnmem : ¬nm ∈ List.map Prod.fst s'
⊢ Schema.names (Schema.removeName ((nm, τ) :: s') Schema.HasName.hd) =
match decide ¬nm ∈ [nm] with
| true => nm :: List.filter (fun x => decide ¬x ∈ [nm]) (List.map Prod.fst s')
| false => List.filter (fun x => decide ¬x ∈ [nm]) (List.map Prod.fst s') |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | dropColumn_spec2_unique | [488, 1] | [527, 19] | have : (decide (nm ∉ [nm])) = false :=
by simp only [decide_not, List.mem_singleton_iff, decide_True,
decide_False, not] | case hd.cons
η : Type u_η
dec_η : DecidableEq η
sch : Schema
c nm : η
s' : Schema
τ : Type u_1
t : Table ((nm, τ) :: s')
hu : List.Unique (List.map Prod.fst s')
hnmem : ¬nm ∈ List.map Prod.fst s'
⊢ Schema.names (Schema.removeName ((nm, τ) :: s') Schema.HasName.hd) =
match decide ¬nm ∈ [nm] with
| true => nm :: List.filter (fun x => decide ¬x ∈ [nm]) (List.map Prod.fst s')
| false => List.filter (fun x => decide ¬x ∈ [nm]) (List.map Prod.fst s') | case hd.cons
η : Type u_η
dec_η : DecidableEq η
sch : Schema
c nm : η
s' : Schema
τ : Type u_1
t : Table ((nm, τ) :: s')
hu : List.Unique (List.map Prod.fst s')
hnmem : ¬nm ∈ List.map Prod.fst s'
this : (decide ¬nm ∈ [nm]) = false
⊢ Schema.names (Schema.removeName ((nm, τ) :: s') Schema.HasName.hd) =
match decide ¬nm ∈ [nm] with
| true => nm :: List.filter (fun x => decide ¬x ∈ [nm]) (List.map Prod.fst s')
| false => List.filter (fun x => decide ¬x ∈ [nm]) (List.map Prod.fst s') |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | dropColumn_spec2_unique | [488, 1] | [527, 19] | rw [this] | case hd.cons
η : Type u_η
dec_η : DecidableEq η
sch : Schema
c nm : η
s' : Schema
τ : Type u_1
t : Table ((nm, τ) :: s')
hu : List.Unique (List.map Prod.fst s')
hnmem : ¬nm ∈ List.map Prod.fst s'
this : (decide ¬nm ∈ [nm]) = false
⊢ Schema.names (Schema.removeName ((nm, τ) :: s') Schema.HasName.hd) =
match decide ¬nm ∈ [nm] with
| true => nm :: List.filter (fun x => decide ¬x ∈ [nm]) (List.map Prod.fst s')
| false => List.filter (fun x => decide ¬x ∈ [nm]) (List.map Prod.fst s') | case hd.cons
η : Type u_η
dec_η : DecidableEq η
sch : Schema
c nm : η
s' : Schema
τ : Type u_1
t : Table ((nm, τ) :: s')
hu : List.Unique (List.map Prod.fst s')
hnmem : ¬nm ∈ List.map Prod.fst s'
this : (decide ¬nm ∈ [nm]) = false
⊢ Schema.names (Schema.removeName ((nm, τ) :: s') Schema.HasName.hd) =
match false with
| true => nm :: List.filter (fun x => decide ¬x ∈ [nm]) (List.map Prod.fst s')
| false => List.filter (fun x => decide ¬x ∈ [nm]) (List.map Prod.fst s') |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | dropColumn_spec2_unique | [488, 1] | [527, 19] | simp only | case hd.cons
η : Type u_η
dec_η : DecidableEq η
sch : Schema
c nm : η
s' : Schema
τ : Type u_1
t : Table ((nm, τ) :: s')
hu : List.Unique (List.map Prod.fst s')
hnmem : ¬nm ∈ List.map Prod.fst s'
this : (decide ¬nm ∈ [nm]) = false
⊢ Schema.names (Schema.removeName ((nm, τ) :: s') Schema.HasName.hd) =
match false with
| true => nm :: List.filter (fun x => decide ¬x ∈ [nm]) (List.map Prod.fst s')
| false => List.filter (fun x => decide ¬x ∈ [nm]) (List.map Prod.fst s') | case hd.cons
η : Type u_η
dec_η : DecidableEq η
sch : Schema
c nm : η
s' : Schema
τ : Type u_1
t : Table ((nm, τ) :: s')
hu : List.Unique (List.map Prod.fst s')
hnmem : ¬nm ∈ List.map Prod.fst s'
this : (decide ¬nm ∈ [nm]) = false
⊢ Schema.names (Schema.removeName ((nm, τ) :: s') Schema.HasName.hd) =
List.filter (fun x => decide ¬x ∈ [nm]) (List.map Prod.fst s') |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | dropColumn_spec2_unique | [488, 1] | [527, 19] | simp only [Schema.names, List.map] | case hd.cons
η : Type u_η
dec_η : DecidableEq η
sch : Schema
c nm : η
s' : Schema
τ : Type u_1
t : Table ((nm, τ) :: s')
hu : List.Unique (List.map Prod.fst s')
hnmem : ¬nm ∈ List.map Prod.fst s'
this : (decide ¬nm ∈ [nm]) = false
⊢ Schema.names (Schema.removeName ((nm, τ) :: s') Schema.HasName.hd) =
List.filter (fun x => decide ¬x ∈ [nm]) (List.map Prod.fst s') | case hd.cons
η : Type u_η
dec_η : DecidableEq η
sch : Schema
c nm : η
s' : Schema
τ : Type u_1
t : Table ((nm, τ) :: s')
hu : List.Unique (List.map Prod.fst s')
hnmem : ¬nm ∈ List.map Prod.fst s'
this : (decide ¬nm ∈ [nm]) = false
⊢ List.map Prod.fst (Schema.removeName ((nm, τ) :: s') Schema.HasName.hd) =
List.filter (fun x => decide ¬x ∈ [nm]) (List.map Prod.fst s') |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | dropColumn_spec2_unique | [488, 1] | [527, 19] | have : List.filter (λ x => x ∉ [nm]) (List.map Prod.fst s')
= List.removeAllEq (List.map Prod.fst s') [nm] := rfl | case hd.cons
η : Type u_η
dec_η : DecidableEq η
sch : Schema
c nm : η
s' : Schema
τ : Type u_1
t : Table ((nm, τ) :: s')
hu : List.Unique (List.map Prod.fst s')
hnmem : ¬nm ∈ List.map Prod.fst s'
this : (decide ¬nm ∈ [nm]) = false
⊢ List.map Prod.fst (Schema.removeName ((nm, τ) :: s') Schema.HasName.hd) =
List.filter (fun x => decide ¬x ∈ [nm]) (List.map Prod.fst s') | case hd.cons
η : Type u_η
dec_η : DecidableEq η
sch : Schema
c nm : η
s' : Schema
τ : Type u_1
t : Table ((nm, τ) :: s')
hu : List.Unique (List.map Prod.fst s')
hnmem : ¬nm ∈ List.map Prod.fst s'
this✝ : (decide ¬nm ∈ [nm]) = false
this : List.filter (fun x => decide ¬x ∈ [nm]) (List.map Prod.fst s') = List.removeAllEq (List.map Prod.fst s') [nm]
⊢ List.map Prod.fst (Schema.removeName ((nm, τ) :: s') Schema.HasName.hd) =
List.filter (fun x => decide ¬x ∈ [nm]) (List.map Prod.fst s') |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | dropColumn_spec2_unique | [488, 1] | [527, 19] | rw [this] | case hd.cons
η : Type u_η
dec_η : DecidableEq η
sch : Schema
c nm : η
s' : Schema
τ : Type u_1
t : Table ((nm, τ) :: s')
hu : List.Unique (List.map Prod.fst s')
hnmem : ¬nm ∈ List.map Prod.fst s'
this✝ : (decide ¬nm ∈ [nm]) = false
this : List.filter (fun x => decide ¬x ∈ [nm]) (List.map Prod.fst s') = List.removeAllEq (List.map Prod.fst s') [nm]
⊢ List.map Prod.fst (Schema.removeName ((nm, τ) :: s') Schema.HasName.hd) =
List.filter (fun x => decide ¬x ∈ [nm]) (List.map Prod.fst s') | case hd.cons
η : Type u_η
dec_η : DecidableEq η
sch : Schema
c nm : η
s' : Schema
τ : Type u_1
t : Table ((nm, τ) :: s')
hu : List.Unique (List.map Prod.fst s')
hnmem : ¬nm ∈ List.map Prod.fst s'
this✝ : (decide ¬nm ∈ [nm]) = false
this : List.filter (fun x => decide ¬x ∈ [nm]) (List.map Prod.fst s') = List.removeAllEq (List.map Prod.fst s') [nm]
⊢ List.map Prod.fst (Schema.removeName ((nm, τ) :: s') Schema.HasName.hd) = List.removeAllEq (List.map Prod.fst s') [nm] |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | dropColumn_spec2_unique | [488, 1] | [527, 19] | rw [List.removeAllEq_singleton_nonelem_eq] | case hd.cons
η : Type u_η
dec_η : DecidableEq η
sch : Schema
c nm : η
s' : Schema
τ : Type u_1
t : Table ((nm, τ) :: s')
hu : List.Unique (List.map Prod.fst s')
hnmem : ¬nm ∈ List.map Prod.fst s'
this✝ : (decide ¬nm ∈ [nm]) = false
this : List.filter (fun x => decide ¬x ∈ [nm]) (List.map Prod.fst s') = List.removeAllEq (List.map Prod.fst s') [nm]
⊢ List.map Prod.fst (Schema.removeName ((nm, τ) :: s') Schema.HasName.hd) = List.removeAllEq (List.map Prod.fst s') [nm] | case hd.cons.a
η : Type u_η
dec_η : DecidableEq η
sch : Schema
c nm : η
s' : Schema
τ : Type u_1
t : Table ((nm, τ) :: s')
hu : List.Unique (List.map Prod.fst s')
hnmem : ¬nm ∈ List.map Prod.fst s'
this✝ : (decide ¬nm ∈ [nm]) = false
this : List.filter (fun x => decide ¬x ∈ [nm]) (List.map Prod.fst s') = List.removeAllEq (List.map Prod.fst s') [nm]
⊢ ¬nm ∈ List.map Prod.fst s' |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | dropColumn_spec2_unique | [488, 1] | [527, 19] | exact hnmem | case hd.cons.a
η : Type u_η
dec_η : DecidableEq η
sch : Schema
c nm : η
s' : Schema
τ : Type u_1
t : Table ((nm, τ) :: s')
hu : List.Unique (List.map Prod.fst s')
hnmem : ¬nm ∈ List.map Prod.fst s'
this✝ : (decide ¬nm ∈ [nm]) = false
this : List.filter (fun x => decide ¬x ∈ [nm]) (List.map Prod.fst s') = List.removeAllEq (List.map Prod.fst s') [nm]
⊢ ¬nm ∈ List.map Prod.fst s' | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | dropColumn_spec2_unique | [488, 1] | [527, 19] | simp only [decide_not, List.mem_singleton_iff, decide_True,
decide_False, not] | η : Type u_η
dec_η : DecidableEq η
sch : Schema
c nm : η
s' : Schema
τ : Type u_1
t : Table ((nm, τ) :: s')
hu : List.Unique (List.map Prod.fst s')
hnmem : ¬nm ∈ List.map Prod.fst s'
⊢ (decide ¬nm ∈ [nm]) = false | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | dropColumn_spec2_unique | [488, 1] | [527, 19] | simp only [Schema.names, List.map] | case tl
η : Type u_η
dec_η : DecidableEq η
sch : Schema
c : η
hdr : Header
nm : η
s' : Schema
h : Schema.HasName nm s'
ih :
List.Unique (Schema.names s') →
Table s' → Schema.names (Schema.removeName s' h) = List.filter (fun x => decide ¬x ∈ [nm]) (Schema.names s')
hsch : List.Unique (Schema.names (hdr :: s'))
t : Table (hdr :: s')
⊢ Schema.names (Schema.removeName (hdr :: s') (Schema.HasName.tl h)) =
List.filter (fun x => decide ¬x ∈ [nm]) (Schema.names (hdr :: s')) | case tl
η : Type u_η
dec_η : DecidableEq η
sch : Schema
c : η
hdr : Header
nm : η
s' : Schema
h : Schema.HasName nm s'
ih :
List.Unique (Schema.names s') →
Table s' → Schema.names (Schema.removeName s' h) = List.filter (fun x => decide ¬x ∈ [nm]) (Schema.names s')
hsch : List.Unique (Schema.names (hdr :: s'))
t : Table (hdr :: s')
⊢ hdr.fst :: List.map Prod.fst (Schema.removeName s' h) =
List.filter (fun x => decide ¬x ∈ [nm]) (hdr.fst :: List.map Prod.fst s') |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | dropColumn_spec2_unique | [488, 1] | [527, 19] | cases hdr with | mk nm₁ τ₁ =>
cases Decidable.em (nm₁ = nm) with
| inl heq =>
rw [heq] at hsch
cases hsch with | cons hnmem hu =>
simp only at hnmem
have := Schema.map_eq_List_map ▸ Schema.mem_map_of_HasName _ _ h
contradiction
| inr hneq =>
rw [←List.removeAllEq]
rw [List.removeAllEq_singleton_hd_neq]
. congr
apply ih
. cases hsch; assumption
. exact Table.mk []
. exact hneq | case tl
η : Type u_η
dec_η : DecidableEq η
sch : Schema
c : η
hdr : Header
nm : η
s' : Schema
h : Schema.HasName nm s'
ih :
List.Unique (Schema.names s') →
Table s' → Schema.names (Schema.removeName s' h) = List.filter (fun x => decide ¬x ∈ [nm]) (Schema.names s')
hsch : List.Unique (Schema.names (hdr :: s'))
t : Table (hdr :: s')
⊢ hdr.fst :: List.map Prod.fst (Schema.removeName s' h) =
List.filter (fun x => decide ¬x ∈ [nm]) (hdr.fst :: List.map Prod.fst s') | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | dropColumn_spec2_unique | [488, 1] | [527, 19] | cases Decidable.em (nm₁ = nm) with
| inl heq =>
rw [heq] at hsch
cases hsch with | cons hnmem hu =>
simp only at hnmem
have := Schema.map_eq_List_map ▸ Schema.mem_map_of_HasName _ _ h
contradiction
| inr hneq =>
rw [←List.removeAllEq]
rw [List.removeAllEq_singleton_hd_neq]
. congr
apply ih
. cases hsch; assumption
. exact Table.mk []
. exact hneq | case tl.mk
η : Type u_η
dec_η : DecidableEq η
sch : Schema
c nm : η
s' : Schema
h : Schema.HasName nm s'
ih :
List.Unique (Schema.names s') →
Table s' → Schema.names (Schema.removeName s' h) = List.filter (fun x => decide ¬x ∈ [nm]) (Schema.names s')
nm₁ : η
τ₁ : Type u_1
hsch : List.Unique (Schema.names ((nm₁, τ₁) :: s'))
t : Table ((nm₁, τ₁) :: s')
⊢ (nm₁, τ₁).fst :: List.map Prod.fst (Schema.removeName s' h) =
List.filter (fun x => decide ¬x ∈ [nm]) ((nm₁, τ₁).fst :: List.map Prod.fst s') | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | dropColumn_spec2_unique | [488, 1] | [527, 19] | rw [heq] at hsch | case tl.mk.inl
η : Type u_η
dec_η : DecidableEq η
sch : Schema
c nm : η
s' : Schema
h : Schema.HasName nm s'
ih :
List.Unique (Schema.names s') →
Table s' → Schema.names (Schema.removeName s' h) = List.filter (fun x => decide ¬x ∈ [nm]) (Schema.names s')
nm₁ : η
τ₁ : Type u_1
hsch : List.Unique (Schema.names ((nm₁, τ₁) :: s'))
t : Table ((nm₁, τ₁) :: s')
heq : nm₁ = nm
⊢ (nm₁, τ₁).fst :: List.map Prod.fst (Schema.removeName s' h) =
List.filter (fun x => decide ¬x ∈ [nm]) ((nm₁, τ₁).fst :: List.map Prod.fst s') | case tl.mk.inl
η : Type u_η
dec_η : DecidableEq η
sch : Schema
c nm : η
s' : Schema
h : Schema.HasName nm s'
ih :
List.Unique (Schema.names s') →
Table s' → Schema.names (Schema.removeName s' h) = List.filter (fun x => decide ¬x ∈ [nm]) (Schema.names s')
nm₁ : η
τ₁ : Type u_1
hsch : List.Unique (Schema.names ((nm, τ₁) :: s'))
t : Table ((nm₁, τ₁) :: s')
heq : nm₁ = nm
⊢ (nm₁, τ₁).fst :: List.map Prod.fst (Schema.removeName s' h) =
List.filter (fun x => decide ¬x ∈ [nm]) ((nm₁, τ₁).fst :: List.map Prod.fst s') |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | dropColumn_spec2_unique | [488, 1] | [527, 19] | cases hsch with | cons hnmem hu =>
simp only at hnmem
have := Schema.map_eq_List_map ▸ Schema.mem_map_of_HasName _ _ h
contradiction | case tl.mk.inl
η : Type u_η
dec_η : DecidableEq η
sch : Schema
c nm : η
s' : Schema
h : Schema.HasName nm s'
ih :
List.Unique (Schema.names s') →
Table s' → Schema.names (Schema.removeName s' h) = List.filter (fun x => decide ¬x ∈ [nm]) (Schema.names s')
nm₁ : η
τ₁ : Type u_1
hsch : List.Unique (Schema.names ((nm, τ₁) :: s'))
t : Table ((nm₁, τ₁) :: s')
heq : nm₁ = nm
⊢ (nm₁, τ₁).fst :: List.map Prod.fst (Schema.removeName s' h) =
List.filter (fun x => decide ¬x ∈ [nm]) ((nm₁, τ₁).fst :: List.map Prod.fst s') | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | dropColumn_spec2_unique | [488, 1] | [527, 19] | simp only at hnmem | case tl.mk.inl.cons
η : Type u_η
dec_η : DecidableEq η
sch : Schema
c nm : η
s' : Schema
h : Schema.HasName nm s'
ih :
List.Unique (Schema.names s') →
Table s' → Schema.names (Schema.removeName s' h) = List.filter (fun x => decide ¬x ∈ [nm]) (Schema.names s')
nm₁ : η
τ₁ : Type u_1
t : Table ((nm₁, τ₁) :: s')
heq : nm₁ = nm
hu : List.Unique (List.map Prod.fst s')
hnmem : ¬(nm, τ₁).fst ∈ List.map Prod.fst s'
⊢ (nm₁, τ₁).fst :: List.map Prod.fst (Schema.removeName s' h) =
List.filter (fun x => decide ¬x ∈ [nm]) ((nm₁, τ₁).fst :: List.map Prod.fst s') | case tl.mk.inl.cons
η : Type u_η
dec_η : DecidableEq η
sch : Schema
c nm : η
s' : Schema
h : Schema.HasName nm s'
ih :
List.Unique (Schema.names s') →
Table s' → Schema.names (Schema.removeName s' h) = List.filter (fun x => decide ¬x ∈ [nm]) (Schema.names s')
nm₁ : η
τ₁ : Type u_1
t : Table ((nm₁, τ₁) :: s')
heq : nm₁ = nm
hu : List.Unique (List.map Prod.fst s')
hnmem : ¬nm ∈ List.map Prod.fst s'
⊢ (nm₁, τ₁).fst :: List.map Prod.fst (Schema.removeName s' h) =
List.filter (fun x => decide ¬x ∈ [nm]) ((nm₁, τ₁).fst :: List.map Prod.fst s') |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | dropColumn_spec2_unique | [488, 1] | [527, 19] | have := Schema.map_eq_List_map ▸ Schema.mem_map_of_HasName _ _ h | case tl.mk.inl.cons
η : Type u_η
dec_η : DecidableEq η
sch : Schema
c nm : η
s' : Schema
h : Schema.HasName nm s'
ih :
List.Unique (Schema.names s') →
Table s' → Schema.names (Schema.removeName s' h) = List.filter (fun x => decide ¬x ∈ [nm]) (Schema.names s')
nm₁ : η
τ₁ : Type u_1
t : Table ((nm₁, τ₁) :: s')
heq : nm₁ = nm
hu : List.Unique (List.map Prod.fst s')
hnmem : ¬nm ∈ List.map Prod.fst s'
⊢ (nm₁, τ₁).fst :: List.map Prod.fst (Schema.removeName s' h) =
List.filter (fun x => decide ¬x ∈ [nm]) ((nm₁, τ₁).fst :: List.map Prod.fst s') | case tl.mk.inl.cons
η : Type u_η
dec_η : DecidableEq η
sch : Schema
c nm : η
s' : Schema
h : Schema.HasName nm s'
ih :
List.Unique (Schema.names s') →
Table s' → Schema.names (Schema.removeName s' h) = List.filter (fun x => decide ¬x ∈ [nm]) (Schema.names s')
nm₁ : η
τ₁ : Type u_1
t : Table ((nm₁, τ₁) :: s')
heq : nm₁ = nm
hu : List.Unique (List.map Prod.fst s')
hnmem : ¬nm ∈ List.map Prod.fst s'
this : nm ∈ List.map Prod.fst s'
⊢ (nm₁, τ₁).fst :: List.map Prod.fst (Schema.removeName s' h) =
List.filter (fun x => decide ¬x ∈ [nm]) ((nm₁, τ₁).fst :: List.map Prod.fst s') |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | dropColumn_spec2_unique | [488, 1] | [527, 19] | contradiction | case tl.mk.inl.cons
η : Type u_η
dec_η : DecidableEq η
sch : Schema
c nm : η
s' : Schema
h : Schema.HasName nm s'
ih :
List.Unique (Schema.names s') →
Table s' → Schema.names (Schema.removeName s' h) = List.filter (fun x => decide ¬x ∈ [nm]) (Schema.names s')
nm₁ : η
τ₁ : Type u_1
t : Table ((nm₁, τ₁) :: s')
heq : nm₁ = nm
hu : List.Unique (List.map Prod.fst s')
hnmem : ¬nm ∈ List.map Prod.fst s'
this : nm ∈ List.map Prod.fst s'
⊢ (nm₁, τ₁).fst :: List.map Prod.fst (Schema.removeName s' h) =
List.filter (fun x => decide ¬x ∈ [nm]) ((nm₁, τ₁).fst :: List.map Prod.fst s') | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | dropColumn_spec2_unique | [488, 1] | [527, 19] | rw [←List.removeAllEq] | case tl.mk.inr
η : Type u_η
dec_η : DecidableEq η
sch : Schema
c nm : η
s' : Schema
h : Schema.HasName nm s'
ih :
List.Unique (Schema.names s') →
Table s' → Schema.names (Schema.removeName s' h) = List.filter (fun x => decide ¬x ∈ [nm]) (Schema.names s')
nm₁ : η
τ₁ : Type u_1
hsch : List.Unique (Schema.names ((nm₁, τ₁) :: s'))
t : Table ((nm₁, τ₁) :: s')
hneq : ¬nm₁ = nm
⊢ (nm₁, τ₁).fst :: List.map Prod.fst (Schema.removeName s' h) =
List.filter (fun x => decide ¬x ∈ [nm]) ((nm₁, τ₁).fst :: List.map Prod.fst s') | case tl.mk.inr
η : Type u_η
dec_η : DecidableEq η
sch : Schema
c nm : η
s' : Schema
h : Schema.HasName nm s'
ih :
List.Unique (Schema.names s') →
Table s' → Schema.names (Schema.removeName s' h) = List.filter (fun x => decide ¬x ∈ [nm]) (Schema.names s')
nm₁ : η
τ₁ : Type u_1
hsch : List.Unique (Schema.names ((nm₁, τ₁) :: s'))
t : Table ((nm₁, τ₁) :: s')
hneq : ¬nm₁ = nm
⊢ (nm₁, τ₁).fst :: List.map Prod.fst (Schema.removeName s' h) =
List.removeAllEq ((nm₁, τ₁).fst :: List.map Prod.fst s') [nm] |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | dropColumn_spec2_unique | [488, 1] | [527, 19] | rw [List.removeAllEq_singleton_hd_neq] | case tl.mk.inr
η : Type u_η
dec_η : DecidableEq η
sch : Schema
c nm : η
s' : Schema
h : Schema.HasName nm s'
ih :
List.Unique (Schema.names s') →
Table s' → Schema.names (Schema.removeName s' h) = List.filter (fun x => decide ¬x ∈ [nm]) (Schema.names s')
nm₁ : η
τ₁ : Type u_1
hsch : List.Unique (Schema.names ((nm₁, τ₁) :: s'))
t : Table ((nm₁, τ₁) :: s')
hneq : ¬nm₁ = nm
⊢ (nm₁, τ₁).fst :: List.map Prod.fst (Schema.removeName s' h) =
List.removeAllEq ((nm₁, τ₁).fst :: List.map Prod.fst s') [nm] | case tl.mk.inr
η : Type u_η
dec_η : DecidableEq η
sch : Schema
c nm : η
s' : Schema
h : Schema.HasName nm s'
ih :
List.Unique (Schema.names s') →
Table s' → Schema.names (Schema.removeName s' h) = List.filter (fun x => decide ¬x ∈ [nm]) (Schema.names s')
nm₁ : η
τ₁ : Type u_1
hsch : List.Unique (Schema.names ((nm₁, τ₁) :: s'))
t : Table ((nm₁, τ₁) :: s')
hneq : ¬nm₁ = nm
⊢ (nm₁, τ₁).fst :: List.map Prod.fst (Schema.removeName s' h) =
(nm₁, τ₁).fst :: List.removeAllEq (List.map Prod.fst s') [nm]
case tl.mk.inr.a
η : Type u_η
dec_η : DecidableEq η
sch : Schema
c nm : η
s' : Schema
h : Schema.HasName nm s'
ih :
List.Unique (Schema.names s') →
Table s' → Schema.names (Schema.removeName s' h) = List.filter (fun x => decide ¬x ∈ [nm]) (Schema.names s')
nm₁ : η
τ₁ : Type u_1
hsch : List.Unique (Schema.names ((nm₁, τ₁) :: s'))
t : Table ((nm₁, τ₁) :: s')
hneq : ¬nm₁ = nm
⊢ (nm₁, τ₁).fst ≠ nm |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | dropColumn_spec2_unique | [488, 1] | [527, 19] | . congr
apply ih
. cases hsch; assumption
. exact Table.mk [] | case tl.mk.inr
η : Type u_η
dec_η : DecidableEq η
sch : Schema
c nm : η
s' : Schema
h : Schema.HasName nm s'
ih :
List.Unique (Schema.names s') →
Table s' → Schema.names (Schema.removeName s' h) = List.filter (fun x => decide ¬x ∈ [nm]) (Schema.names s')
nm₁ : η
τ₁ : Type u_1
hsch : List.Unique (Schema.names ((nm₁, τ₁) :: s'))
t : Table ((nm₁, τ₁) :: s')
hneq : ¬nm₁ = nm
⊢ (nm₁, τ₁).fst :: List.map Prod.fst (Schema.removeName s' h) =
(nm₁, τ₁).fst :: List.removeAllEq (List.map Prod.fst s') [nm]
case tl.mk.inr.a
η : Type u_η
dec_η : DecidableEq η
sch : Schema
c nm : η
s' : Schema
h : Schema.HasName nm s'
ih :
List.Unique (Schema.names s') →
Table s' → Schema.names (Schema.removeName s' h) = List.filter (fun x => decide ¬x ∈ [nm]) (Schema.names s')
nm₁ : η
τ₁ : Type u_1
hsch : List.Unique (Schema.names ((nm₁, τ₁) :: s'))
t : Table ((nm₁, τ₁) :: s')
hneq : ¬nm₁ = nm
⊢ (nm₁, τ₁).fst ≠ nm | case tl.mk.inr.a
η : Type u_η
dec_η : DecidableEq η
sch : Schema
c nm : η
s' : Schema
h : Schema.HasName nm s'
ih :
List.Unique (Schema.names s') →
Table s' → Schema.names (Schema.removeName s' h) = List.filter (fun x => decide ¬x ∈ [nm]) (Schema.names s')
nm₁ : η
τ₁ : Type u_1
hsch : List.Unique (Schema.names ((nm₁, τ₁) :: s'))
t : Table ((nm₁, τ₁) :: s')
hneq : ¬nm₁ = nm
⊢ (nm₁, τ₁).fst ≠ nm |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | dropColumn_spec2_unique | [488, 1] | [527, 19] | . exact hneq | case tl.mk.inr.a
η : Type u_η
dec_η : DecidableEq η
sch : Schema
c nm : η
s' : Schema
h : Schema.HasName nm s'
ih :
List.Unique (Schema.names s') →
Table s' → Schema.names (Schema.removeName s' h) = List.filter (fun x => decide ¬x ∈ [nm]) (Schema.names s')
nm₁ : η
τ₁ : Type u_1
hsch : List.Unique (Schema.names ((nm₁, τ₁) :: s'))
t : Table ((nm₁, τ₁) :: s')
hneq : ¬nm₁ = nm
⊢ (nm₁, τ₁).fst ≠ nm | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | dropColumn_spec2_unique | [488, 1] | [527, 19] | congr | case tl.mk.inr
η : Type u_η
dec_η : DecidableEq η
sch : Schema
c nm : η
s' : Schema
h : Schema.HasName nm s'
ih :
List.Unique (Schema.names s') →
Table s' → Schema.names (Schema.removeName s' h) = List.filter (fun x => decide ¬x ∈ [nm]) (Schema.names s')
nm₁ : η
τ₁ : Type u_1
hsch : List.Unique (Schema.names ((nm₁, τ₁) :: s'))
t : Table ((nm₁, τ₁) :: s')
hneq : ¬nm₁ = nm
⊢ (nm₁, τ₁).fst :: List.map Prod.fst (Schema.removeName s' h) =
(nm₁, τ₁).fst :: List.removeAllEq (List.map Prod.fst s') [nm] | case tl.mk.inr.e_tail
η : Type u_η
dec_η : DecidableEq η
sch : Schema
c nm : η
s' : Schema
h : Schema.HasName nm s'
ih :
List.Unique (Schema.names s') →
Table s' → Schema.names (Schema.removeName s' h) = List.filter (fun x => decide ¬x ∈ [nm]) (Schema.names s')
nm₁ : η
τ₁ : Type u_1
hsch : List.Unique (Schema.names ((nm₁, τ₁) :: s'))
t : Table ((nm₁, τ₁) :: s')
hneq : ¬nm₁ = nm
⊢ List.map Prod.fst (Schema.removeName s' h) = List.removeAllEq (List.map Prod.fst s') [nm] |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | dropColumn_spec2_unique | [488, 1] | [527, 19] | apply ih | case tl.mk.inr.e_tail
η : Type u_η
dec_η : DecidableEq η
sch : Schema
c nm : η
s' : Schema
h : Schema.HasName nm s'
ih :
List.Unique (Schema.names s') →
Table s' → Schema.names (Schema.removeName s' h) = List.filter (fun x => decide ¬x ∈ [nm]) (Schema.names s')
nm₁ : η
τ₁ : Type u_1
hsch : List.Unique (Schema.names ((nm₁, τ₁) :: s'))
t : Table ((nm₁, τ₁) :: s')
hneq : ¬nm₁ = nm
⊢ List.map Prod.fst (Schema.removeName s' h) = List.removeAllEq (List.map Prod.fst s') [nm] | case tl.mk.inr.e_tail.hsch
η : Type u_η
dec_η : DecidableEq η
sch : Schema
c nm : η
s' : Schema
h : Schema.HasName nm s'
ih :
List.Unique (Schema.names s') →
Table s' → Schema.names (Schema.removeName s' h) = List.filter (fun x => decide ¬x ∈ [nm]) (Schema.names s')
nm₁ : η
τ₁ : Type u_1
hsch : List.Unique (Schema.names ((nm₁, τ₁) :: s'))
t : Table ((nm₁, τ₁) :: s')
hneq : ¬nm₁ = nm
⊢ List.Unique (Schema.names s')
case tl.mk.inr.e_tail.t
η : Type u_η
dec_η : DecidableEq η
sch : Schema
c nm : η
s' : Schema
h : Schema.HasName nm s'
ih :
List.Unique (Schema.names s') →
Table s' → Schema.names (Schema.removeName s' h) = List.filter (fun x => decide ¬x ∈ [nm]) (Schema.names s')
nm₁ : η
τ₁ : Type u_1
hsch : List.Unique (Schema.names ((nm₁, τ₁) :: s'))
t : Table ((nm₁, τ₁) :: s')
hneq : ¬nm₁ = nm
⊢ Table s' |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | dropColumn_spec2_unique | [488, 1] | [527, 19] | . cases hsch; assumption | case tl.mk.inr.e_tail.hsch
η : Type u_η
dec_η : DecidableEq η
sch : Schema
c nm : η
s' : Schema
h : Schema.HasName nm s'
ih :
List.Unique (Schema.names s') →
Table s' → Schema.names (Schema.removeName s' h) = List.filter (fun x => decide ¬x ∈ [nm]) (Schema.names s')
nm₁ : η
τ₁ : Type u_1
hsch : List.Unique (Schema.names ((nm₁, τ₁) :: s'))
t : Table ((nm₁, τ₁) :: s')
hneq : ¬nm₁ = nm
⊢ List.Unique (Schema.names s')
case tl.mk.inr.e_tail.t
η : Type u_η
dec_η : DecidableEq η
sch : Schema
c nm : η
s' : Schema
h : Schema.HasName nm s'
ih :
List.Unique (Schema.names s') →
Table s' → Schema.names (Schema.removeName s' h) = List.filter (fun x => decide ¬x ∈ [nm]) (Schema.names s')
nm₁ : η
τ₁ : Type u_1
hsch : List.Unique (Schema.names ((nm₁, τ₁) :: s'))
t : Table ((nm₁, τ₁) :: s')
hneq : ¬nm₁ = nm
⊢ Table s' | case tl.mk.inr.e_tail.t
η : Type u_η
dec_η : DecidableEq η
sch : Schema
c nm : η
s' : Schema
h : Schema.HasName nm s'
ih :
List.Unique (Schema.names s') →
Table s' → Schema.names (Schema.removeName s' h) = List.filter (fun x => decide ¬x ∈ [nm]) (Schema.names s')
nm₁ : η
τ₁ : Type u_1
hsch : List.Unique (Schema.names ((nm₁, τ₁) :: s'))
t : Table ((nm₁, τ₁) :: s')
hneq : ¬nm₁ = nm
⊢ Table s' |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | dropColumn_spec2_unique | [488, 1] | [527, 19] | . exact Table.mk [] | case tl.mk.inr.e_tail.t
η : Type u_η
dec_η : DecidableEq η
sch : Schema
c nm : η
s' : Schema
h : Schema.HasName nm s'
ih :
List.Unique (Schema.names s') →
Table s' → Schema.names (Schema.removeName s' h) = List.filter (fun x => decide ¬x ∈ [nm]) (Schema.names s')
nm₁ : η
τ₁ : Type u_1
hsch : List.Unique (Schema.names ((nm₁, τ₁) :: s'))
t : Table ((nm₁, τ₁) :: s')
hneq : ¬nm₁ = nm
⊢ Table s' | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | dropColumn_spec2_unique | [488, 1] | [527, 19] | cases hsch | case tl.mk.inr.e_tail.hsch
η : Type u_η
dec_η : DecidableEq η
sch : Schema
c nm : η
s' : Schema
h : Schema.HasName nm s'
ih :
List.Unique (Schema.names s') →
Table s' → Schema.names (Schema.removeName s' h) = List.filter (fun x => decide ¬x ∈ [nm]) (Schema.names s')
nm₁ : η
τ₁ : Type u_1
hsch : List.Unique (Schema.names ((nm₁, τ₁) :: s'))
t : Table ((nm₁, τ₁) :: s')
hneq : ¬nm₁ = nm
⊢ List.Unique (Schema.names s') | case tl.mk.inr.e_tail.hsch.cons
η : Type u_η
dec_η : DecidableEq η
sch : Schema
c nm : η
s' : Schema
h : Schema.HasName nm s'
ih :
List.Unique (Schema.names s') →
Table s' → Schema.names (Schema.removeName s' h) = List.filter (fun x => decide ¬x ∈ [nm]) (Schema.names s')
nm₁ : η
τ₁ : Type u_1
t : Table ((nm₁, τ₁) :: s')
hneq : ¬nm₁ = nm
a✝¹ : List.Unique (List.map Prod.fst s')
a✝ : ¬(nm₁, τ₁).fst ∈ List.map Prod.fst s'
⊢ List.Unique (Schema.names s') |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | dropColumn_spec2_unique | [488, 1] | [527, 19] | assumption | case tl.mk.inr.e_tail.hsch.cons
η : Type u_η
dec_η : DecidableEq η
sch : Schema
c nm : η
s' : Schema
h : Schema.HasName nm s'
ih :
List.Unique (Schema.names s') →
Table s' → Schema.names (Schema.removeName s' h) = List.filter (fun x => decide ¬x ∈ [nm]) (Schema.names s')
nm₁ : η
τ₁ : Type u_1
t : Table ((nm₁, τ₁) :: s')
hneq : ¬nm₁ = nm
a✝¹ : List.Unique (List.map Prod.fst s')
a✝ : ¬(nm₁, τ₁).fst ∈ List.map Prod.fst s'
⊢ List.Unique (Schema.names s') | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | dropColumn_spec2_unique | [488, 1] | [527, 19] | exact Table.mk [] | case tl.mk.inr.e_tail.t
η : Type u_η
dec_η : DecidableEq η
sch : Schema
c nm : η
s' : Schema
h : Schema.HasName nm s'
ih :
List.Unique (Schema.names s') →
Table s' → Schema.names (Schema.removeName s' h) = List.filter (fun x => decide ¬x ∈ [nm]) (Schema.names s')
nm₁ : η
τ₁ : Type u_1
hsch : List.Unique (Schema.names ((nm₁, τ₁) :: s'))
t : Table ((nm₁, τ₁) :: s')
hneq : ¬nm₁ = nm
⊢ Table s' | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | dropColumn_spec2_unique | [488, 1] | [527, 19] | exact hneq | case tl.mk.inr.a
η : Type u_η
dec_η : DecidableEq η
sch : Schema
c nm : η
s' : Schema
h : Schema.HasName nm s'
ih :
List.Unique (Schema.names s') →
Table s' → Schema.names (Schema.removeName s' h) = List.filter (fun x => decide ¬x ∈ [nm]) (Schema.names s')
nm₁ : η
τ₁ : Type u_1
hsch : List.Unique (Schema.names ((nm₁, τ₁) :: s'))
t : Table ((nm₁, τ₁) :: s')
hneq : ¬nm₁ = nm
⊢ (nm₁, τ₁).fst ≠ nm | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | dropColumns_spec1 | [535, 1] | [540, 24] | intro t cs | η : Type u_η
dec_η : DecidableEq η
sch : Schema
⊢ ∀ (t : Table sch) (cs : ActionList Schema.removeCertifiedName sch), nrows (dropColumns t cs) = nrows t | η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
cs : ActionList Schema.removeCertifiedName sch
⊢ nrows (dropColumns t cs) = nrows t |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | dropColumns_spec1 | [535, 1] | [540, 24] | simp only [nrows, dropColumns, Schema.length_eq_List_length] | η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
cs : ActionList Schema.removeCertifiedName sch
⊢ nrows (dropColumns t cs) = nrows t | η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
cs : ActionList Schema.removeCertifiedName sch
⊢ List.length (List.map (Row.removeColumns cs) t.rows) = List.length t.rows |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | dropColumns_spec1 | [535, 1] | [540, 24] | apply List.length_map | η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
cs : ActionList Schema.removeCertifiedName sch
⊢ List.length (List.map (Row.removeColumns cs) t.rows) = List.length t.rows | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | tsort_spec1 | [562, 1] | [570, 43] | intro τ _ t b c hc | η : Type u_η
dec_η : DecidableEq η
sch : Schema
⊢ ∀ {τ : Type u} [inst : Ord τ] (t : Table sch) (b : Bool) (c : η) (hc : Schema.HasCol (c, τ) sch),
nrows (tsort t c b) = nrows t | η : Type u_η
dec_η : DecidableEq η
sch : Schema
τ : Type u
inst✝ : Ord τ
t : Table sch
b : Bool
c : η
hc : Schema.HasCol (c, τ) sch
⊢ nrows (tsort t c b) = nrows t |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | tsort_spec1 | [562, 1] | [570, 43] | simp only [nrows, Schema.length_eq_List_length] | η : Type u_η
dec_η : DecidableEq η
sch : Schema
τ : Type u
inst✝ : Ord τ
t : Table sch
b : Bool
c : η
hc : Schema.HasCol (c, τ) sch
⊢ nrows (tsort t c b) = nrows t | η : Type u_η
dec_η : DecidableEq η
sch : Schema
τ : Type u
inst✝ : Ord τ
t : Table sch
b : Bool
c : η
hc : Schema.HasCol (c, τ) sch
⊢ List.length (tsort t c b).rows = List.length t.rows |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | tsort_spec1 | [562, 1] | [570, 43] | exact List.length_mergeSortWith _ t.rows | η : Type u_η
dec_η : DecidableEq η
sch : Schema
τ : Type u
inst✝ : Ord τ
t : Table sch
b : Bool
c : η
hc : Schema.HasCol (c, τ) sch
⊢ List.length (tsort t c b).rows = List.length t.rows | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | sortByColumns_spec1 | [582, 1] | [593, 43] | intros t hs | η : Type u_η
dec_η : DecidableEq η
sch : Schema
⊢ ∀ (t : Table sch) (hs : List ((h : Header) × Schema.HasCol h sch × Ord h.snd)), nrows (sortByColumns t hs) = nrows t | η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
hs : List ((h : Header) × Schema.HasCol h sch × Ord h.snd)
⊢ nrows (sortByColumns t hs) = nrows t |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | sortByColumns_spec1 | [582, 1] | [593, 43] | simp only [nrows, sortByColumns] | η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
hs : List ((h : Header) × Schema.HasCol h sch × Ord h.snd)
⊢ nrows (sortByColumns t hs) = nrows t | η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
hs : List ((h : Header) × Schema.HasCol h sch × Ord h.snd)
⊢ Schema.length (List.foldr (fun ohdr acc => tsort acc ohdr.fst.fst true) t hs).rows = Schema.length t.rows |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | sortByColumns_spec1 | [582, 1] | [593, 43] | apply List.foldr_invariant (λ x => nrows x = nrows t) | η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
hs : List ((h : Header) × Schema.HasCol h sch × Ord h.snd)
⊢ Schema.length (List.foldr (fun ohdr acc => tsort acc ohdr.fst.fst true) t hs).rows = Schema.length t.rows | case a
η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
hs : List ((h : Header) × Schema.HasCol h sch × Ord h.snd)
⊢ nrows t = 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) (a : Table sch),
nrows a = nrows t → nrows (tsort a x.fst.fst true) = nrows t |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | sortByColumns_spec1 | [582, 1] | [593, 43] | . rfl | case a
η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
hs : List ((h : Header) × Schema.HasCol h sch × Ord h.snd)
⊢ nrows t = 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) (a : Table sch),
nrows a = nrows t → nrows (tsort a 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) (a : Table sch),
nrows a = nrows t → nrows (tsort a x.fst.fst true) = nrows t |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | sortByColumns_spec1 | [582, 1] | [593, 43] | . intros x acc h
rw [←h]
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) (a : Table sch),
nrows a = nrows t → nrows (tsort a x.fst.fst true) = nrows t | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | sortByColumns_spec1 | [582, 1] | [593, 43] | rfl | case a
η : Type u_η
dec_η : DecidableEq η
sch : Schema
t : Table sch
hs : List ((h : Header) × Schema.HasCol h sch × Ord h.snd)
⊢ nrows t = nrows t | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | sortByColumns_spec1 | [582, 1] | [593, 43] | intros x acc 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) (a : Table sch),
nrows a = nrows t → nrows (tsort a 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 t |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.