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 | groupBySubtractive_spec4 | [1140, 1] | [1172, 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 | groupBySubtractive_spec4 | [1140, 1] | [1172, 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 | groupBySubtractive_spec4 | [1140, 1] | [1172, 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 | groupBySubtractive_spec4 | [1140, 1] | [1172, 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 | groupBySubtractive_spec4 | [1140, 1] | [1172, 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 | groupBySubtractive_spec4 | [1140, 1] | [1172, 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 | groupBySubtractive_spec4 | [1140, 1] | [1172, 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 | groupBySubtractive_spec4 | [1140, 1] | [1172, 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 | groupBySubtractive_spec4 | [1140, 1] | [1172, 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 | groupBySubtractive_spec4 | [1140, 1] | [1172, 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 | groupBySubtractive_spec4 | [1140, 1] | [1172, 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 | groupBySubtractive_spec4 | [1140, 1] | [1172, 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 | groupBySubtractive_spec4 | [1140, 1] | [1172, 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 | 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 | update_spec4 | [1221, 1] | [1227, 24] | intros | η : Type u_η
dec_η : DecidableEq η
sch : Schema
⊢ ∀ (subsch : RetypedSubschema sch) (t : Table sch) (f : Row sch → Row (RetypedSubschema.toSchema subsch)),
nrows (update subsch t f) = nrows t | η : Type u_η
dec_η : DecidableEq η
sch : Schema
subsch✝ : RetypedSubschema sch
t✝ : Table sch
f✝ : Row sch → Row (RetypedSubschema.toSchema subsch✝)
⊢ nrows (update subsch✝ t✝ f✝) = nrows t✝ |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | update_spec4 | [1221, 1] | [1227, 24] | simp only [nrows, update, Schema.length_eq_List_length] | η : Type u_η
dec_η : DecidableEq η
sch : Schema
subsch✝ : RetypedSubschema sch
t✝ : Table sch
f✝ : Row sch → Row (RetypedSubschema.toSchema subsch✝)
⊢ nrows (update subsch✝ t✝ f✝) = nrows t✝ | η : Type u_η
dec_η : DecidableEq η
sch : Schema
subsch✝ : RetypedSubschema sch
t✝ : Table sch
f✝ : Row sch → Row (RetypedSubschema.toSchema subsch✝)
⊢ List.length (List.map (fun r => update.updateCells r (f✝ r)) t✝.rows) = List.length t✝.rows |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | update_spec4 | [1221, 1] | [1227, 24] | apply List.length_map | η : Type u_η
dec_η : DecidableEq η
sch : Schema
subsch✝ : RetypedSubschema sch
t✝ : Table sch
f✝ : Row sch → Row (RetypedSubschema.toSchema subsch✝)
⊢ List.length (List.map (fun r => update.updateCells r (f✝ r)) t✝.rows) = List.length t✝.rows | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | select_spec4 | [1232, 1] | [1237, 68] | intros | η : Type u_η
dec_η : DecidableEq η
sch : Schema
sch' : Schema
⊢ ∀ (t : Table sch) (f : Row sch → Fin (nrows t) → Row sch'), nrows (select t f) = nrows t | η : Type u_η
dec_η : DecidableEq η
sch : Schema
sch' : Schema
t✝ : Table sch
f✝ : Row sch → Fin (nrows t✝) → Row sch'
⊢ nrows (select t✝ f✝) = nrows t✝ |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | select_spec4 | [1232, 1] | [1237, 68] | simp only [nrows, select, Schema.length_eq_List_length] | η : Type u_η
dec_η : DecidableEq η
sch : Schema
sch' : Schema
t✝ : Table sch
f✝ : Row sch → Fin (nrows t✝) → Row sch'
⊢ nrows (select t✝ f✝) = nrows t✝ | η : Type u_η
dec_η : DecidableEq η
sch : Schema
sch' : Schema
t✝ : Table sch
f✝ : Row sch → Fin (nrows t✝) → Row sch'
⊢ List.length
(List.map (fun x => f✝ x.snd ((_ : List.length t✝.rows = nrows t✝) ▸ x.fst)) (List.verifiedEnum t✝.rows)) =
List.length t✝.rows |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/Proofs.lean | select_spec4 | [1232, 1] | [1237, 68] | exact Eq.trans (List.length_map _ _) (List.length_verifiedEnum _) | η : Type u_η
dec_η : DecidableEq η
sch : Schema
sch' : Schema
t✝ : Table sch
f✝ : Row sch → Fin (nrows t✝) → Row sch'
⊢ List.length
(List.map (fun x => f✝ x.snd ((_ : List.length t✝.rows = nrows t✝) ▸ x.fst)) (List.verifiedEnum t✝.rows)) =
List.length t✝.rows | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.map_eq_List_map | [33, 1] | [39, 24] | funext _ _ _ xs | η : Type u_η
dec_η : DecidableEq η
schema : Schema
⊢ @map = @List.map | case h.h.h.h
η : Type u_η
dec_η : DecidableEq η
schema : Schema
x✝² : Type u_2
x✝¹ : Type u_1
x✝ : x✝² → x✝¹
xs : List x✝²
⊢ map x✝ xs = List.map x✝ xs |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.map_eq_List_map | [33, 1] | [39, 24] | induction xs with
| nil => rfl
| cons _ _ ih =>
simp only [map, List.map]
exact congrArg _ ih | case h.h.h.h
η : Type u_η
dec_η : DecidableEq η
schema : Schema
x✝² : Type u_2
x✝¹ : Type u_1
x✝ : x✝² → x✝¹
xs : List x✝²
⊢ map x✝ xs = List.map x✝ xs | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.map_eq_List_map | [33, 1] | [39, 24] | rfl | case h.h.h.h.nil
η : Type u_η
dec_η : DecidableEq η
schema : Schema
x✝² : Type u_2
x✝¹ : Type u_1
x✝ : x✝² → x✝¹
⊢ map x✝ [] = List.map x✝ [] | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.map_eq_List_map | [33, 1] | [39, 24] | simp only [map, List.map] | case h.h.h.h.cons
η : Type u_η
dec_η : DecidableEq η
schema : Schema
x✝² : Type u_2
x✝¹ : Type u_1
x✝ : x✝² → x✝¹
head✝ : x✝²
tail✝ : List x✝²
ih : map x✝ tail✝ = List.map x✝ tail✝
⊢ map x✝ (head✝ :: tail✝) = List.map x✝ (head✝ :: tail✝) | case h.h.h.h.cons
η : Type u_η
dec_η : DecidableEq η
schema : Schema
x✝² : Type u_2
x✝¹ : Type u_1
x✝ : x✝² → x✝¹
head✝ : x✝²
tail✝ : List x✝²
ih : map x✝ tail✝ = List.map x✝ tail✝
⊢ x✝ head✝ :: map x✝ tail✝ = x✝ head✝ :: List.map x✝ tail✝ |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.map_eq_List_map | [33, 1] | [39, 24] | exact congrArg _ ih | case h.h.h.h.cons
η : Type u_η
dec_η : DecidableEq η
schema : Schema
x✝² : Type u_2
x✝¹ : Type u_1
x✝ : x✝² → x✝¹
head✝ : x✝²
tail✝ : List x✝²
ih : map x✝ tail✝ = List.map x✝ tail✝
⊢ x✝ head✝ :: map x✝ tail✝ = x✝ head✝ :: List.map x✝ tail✝ | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.length_eq_List_length | [46, 1] | [52, 24] | funext _ xs | η : Type u_η
dec_η : DecidableEq η
schema : Schema
⊢ @length = @List.length | case h.h
η : Type u_η
dec_η : DecidableEq η
schema : Schema
x✝ : Type u_1
xs : List x✝
⊢ length xs = List.length xs |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.length_eq_List_length | [46, 1] | [52, 24] | induction xs with
| nil => rfl
| cons _ _ ih =>
simp only [length, List.length]
exact congrArg _ ih | case h.h
η : Type u_η
dec_η : DecidableEq η
schema : Schema
x✝ : Type u_1
xs : List x✝
⊢ length xs = List.length xs | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.length_eq_List_length | [46, 1] | [52, 24] | rfl | case h.h.nil
η : Type u_η
dec_η : DecidableEq η
schema : Schema
x✝ : Type u_1
⊢ length [] = List.length [] | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.length_eq_List_length | [46, 1] | [52, 24] | simp only [length, List.length] | case h.h.cons
η : Type u_η
dec_η : DecidableEq η
schema : Schema
x✝ : Type u_1
head✝ : x✝
tail✝ : List x✝
ih : length tail✝ = List.length tail✝
⊢ length (head✝ :: tail✝) = List.length (head✝ :: tail✝) | case h.h.cons
η : Type u_η
dec_η : DecidableEq η
schema : Schema
x✝ : Type u_1
head✝ : x✝
tail✝ : List x✝
ih : length tail✝ = List.length tail✝
⊢ length tail✝ + 1 = List.length tail✝ + 1 |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.length_eq_List_length | [46, 1] | [52, 24] | exact congrArg _ ih | case h.h.cons
η : Type u_η
dec_η : DecidableEq η
schema : Schema
x✝ : Type u_1
head✝ : x✝
tail✝ : List x✝
ih : length tail✝ = List.length tail✝
⊢ length tail✝ + 1 = List.length tail✝ + 1 | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.length_nths | [71, 1] | [74, 24] | rw [nths, Schema.map_eq_List_map] | η : Type u_η
dec_η : DecidableEq η
schema : Schema
α : Type u_1
xs : List α
ns : List (Fin (length xs))
⊢ List.length (nths xs ns) = List.length ns | η : Type u_η
dec_η : DecidableEq η
schema : Schema
α : Type u_1
xs : List α
ns : List (Fin (length xs))
⊢ List.length (List.map (fun n => nth xs n.val (_ : n.val < length xs)) ns) = List.length ns |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.length_nths | [71, 1] | [74, 24] | apply List.length_map | η : Type u_η
dec_η : DecidableEq η
schema : Schema
α : Type u_1
xs : List α
ns : List (Fin (length xs))
⊢ List.length (List.map (fun n => nth xs n.val (_ : n.val < length xs)) ns) = List.length ns | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.sieve_eq_List_sieve | [83, 1] | [90, 11] | simp only [sieve, List.sieve] | η : Type u_η
dec_η : DecidableEq η
schema : Schema
τ : Type u_1
bs : List Bool
xs✝ xs : List τ
⊢ sieve [] xs = List.sieve [] xs | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.sieve_eq_List_sieve | [83, 1] | [90, 11] | simp only [sieve, List.sieve] | η : Type u_η
dec_η : DecidableEq η
schema : Schema
τ : Type u_1
bs : List Bool
xs : List τ
head✝ : Bool
tail✝ : List Bool
⊢ sieve (head✝ :: tail✝) [] = List.sieve (head✝ :: tail✝) [] | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.get_map_nths_eq_get_get | [106, 1] | [126, 11] | simp only [nths, map, get] | η : Type u_η
dec_η : DecidableEq η
schema : Schema
α : Type u_1
β : Type u_2
xs : List (α × β)
n : Fin (length xs)
ns : List (Fin (length xs))
hi : 0 < List.length (n :: ns)
⊢ List.get (List.map Prod.fst (nths xs (n :: ns)))
{ val := 0, isLt := (_ : 0 < List.length (List.map Prod.fst (nths xs (n :: ns)))) } =
List.get (List.map Prod.fst xs)
{ val := (List.get (n :: ns) { val := 0, isLt := hi }).val,
isLt := (_ : (List.get (n :: ns) { val := 0, isLt := hi }).val < List.length (List.map Prod.fst xs)) } | η : Type u_η
dec_η : DecidableEq η
schema : Schema
α : Type u_1
β : Type u_2
xs : List (α × β)
n : Fin (length xs)
ns : List (Fin (length xs))
hi : 0 < List.length (n :: ns)
⊢ List.get
(List.map Prod.fst
(nth xs n.val (_ : n.val < length xs) :: map (fun n => nth xs n.val (_ : n.val < length xs)) ns))
{ val := 0, isLt := (_ : 0 < List.length (List.map Prod.fst (nths xs (n :: ns)))) } =
List.get (List.map Prod.fst xs)
{ val := (List.get (n :: ns) { val := 0, isLt := hi }).val,
isLt := (_ : (List.get (n :: ns) { val := 0, isLt := hi }).val < List.length (List.map Prod.fst xs)) } |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.get_map_nths_eq_get_get | [106, 1] | [126, 11] | rw [nth_eq_get] | η : Type u_η
dec_η : DecidableEq η
schema : Schema
α : Type u_1
β : Type u_2
xs : List (α × β)
n : Fin (length xs)
ns : List (Fin (length xs))
hi : 0 < List.length (n :: ns)
⊢ List.get
(List.map Prod.fst
(nth xs n.val (_ : n.val < length xs) :: map (fun n => nth xs n.val (_ : n.val < length xs)) ns))
{ val := 0, isLt := (_ : 0 < List.length (List.map Prod.fst (nths xs (n :: ns)))) } =
List.get (List.map Prod.fst xs)
{ val := (List.get (n :: ns) { val := 0, isLt := hi }).val,
isLt := (_ : (List.get (n :: ns) { val := 0, isLt := hi }).val < List.length (List.map Prod.fst xs)) } | η : Type u_η
dec_η : DecidableEq η
schema : Schema
α : Type u_1
β : Type u_2
xs : List (α × β)
n : Fin (length xs)
ns : List (Fin (length xs))
hi : 0 < List.length (n :: ns)
⊢ List.get
(List.map Prod.fst
(List.get xs { val := n.val, isLt := (_ : n.val < List.length xs) } ::
map (fun n => nth xs n.val (_ : n.val < length xs)) ns))
{ val := 0, isLt := (_ : 0 < List.length (List.map Prod.fst (nths xs (n :: ns)))) } =
List.get (List.map Prod.fst xs)
{ val := (List.get (n :: ns) { val := 0, isLt := hi }).val,
isLt := (_ : (List.get (n :: ns) { val := 0, isLt := hi }).val < List.length (List.map Prod.fst xs)) } |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.get_map_nths_eq_get_get | [106, 1] | [126, 11] | simp only [List.get] | η : Type u_η
dec_η : DecidableEq η
schema : Schema
α : Type u_1
β : Type u_2
xs : List (α × β)
n : Fin (length xs)
ns : List (Fin (length xs))
hi : 0 < List.length (n :: ns)
⊢ List.get
(List.map Prod.fst
(List.get xs { val := n.val, isLt := (_ : n.val < List.length xs) } ::
map (fun n => nth xs n.val (_ : n.val < length xs)) ns))
{ val := 0, isLt := (_ : 0 < List.length (List.map Prod.fst (nths xs (n :: ns)))) } =
List.get (List.map Prod.fst xs)
{ val := (List.get (n :: ns) { val := 0, isLt := hi }).val,
isLt := (_ : (List.get (n :: ns) { val := 0, isLt := hi }).val < List.length (List.map Prod.fst xs)) } | η : Type u_η
dec_η : DecidableEq η
schema : Schema
α : Type u_1
β : Type u_2
xs : List (α × β)
n : Fin (length xs)
ns : List (Fin (length xs))
hi : 0 < List.length (n :: ns)
⊢ (List.get xs { val := n.val, isLt := (_ : n.val < List.length xs) }).fst =
List.get (List.map Prod.fst xs) { val := n.val, isLt := (_ : n.val < List.length (List.map Prod.fst xs)) } |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.get_map_nths_eq_get_get | [106, 1] | [126, 11] | rw [List.get_map Prod.fst] | η : Type u_η
dec_η : DecidableEq η
schema : Schema
α : Type u_1
β : Type u_2
xs : List (α × β)
n : Fin (length xs)
ns : List (Fin (length xs))
hi : 0 < List.length (n :: ns)
⊢ (List.get xs { val := n.val, isLt := (_ : n.val < List.length xs) }).fst =
List.get (List.map Prod.fst xs) { val := n.val, isLt := (_ : n.val < List.length (List.map Prod.fst xs)) } | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.get_map_nths_eq_get_get | [106, 1] | [126, 11] | simp only [nths, map, get] | η : Type u_η
dec_η : DecidableEq η
schema : Schema
α : Type u_1
β : Type u_2
xs : List (α × β)
n : Fin (length xs)
ns : List (Fin (length xs))
i : Nat
hi : Nat.succ i < List.length (n :: ns)
⊢ List.get (List.map Prod.fst (nths xs (n :: ns)))
{ val := Nat.succ i, isLt := (_ : Nat.succ i < List.length (List.map Prod.fst (nths xs (n :: ns)))) } =
List.get (List.map Prod.fst xs)
{ val := (List.get (n :: ns) { val := Nat.succ i, isLt := hi }).val,
isLt := (_ : (List.get (n :: ns) { val := Nat.succ i, isLt := hi }).val < List.length (List.map Prod.fst xs)) } | η : Type u_η
dec_η : DecidableEq η
schema : Schema
α : Type u_1
β : Type u_2
xs : List (α × β)
n : Fin (length xs)
ns : List (Fin (length xs))
i : Nat
hi : Nat.succ i < List.length (n :: ns)
⊢ List.get
(List.map Prod.fst
(nth xs n.val (_ : n.val < length xs) :: map (fun n => nth xs n.val (_ : n.val < length xs)) ns))
{ val := Nat.succ i, isLt := (_ : Nat.succ i < List.length (List.map Prod.fst (nths xs (n :: ns)))) } =
List.get (List.map Prod.fst xs)
{ val := (List.get (n :: ns) { val := Nat.succ i, isLt := hi }).val,
isLt := (_ : (List.get (n :: ns) { val := Nat.succ i, isLt := hi }).val < List.length (List.map Prod.fst xs)) } |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.get_map_nths_eq_get_get | [106, 1] | [126, 11] | have ih := get_map_nths_eq_get_get xs ns i (Nat.lt_of_succ_lt_succ hi) | η : Type u_η
dec_η : DecidableEq η
schema : Schema
α : Type u_1
β : Type u_2
xs : List (α × β)
n : Fin (length xs)
ns : List (Fin (length xs))
i : Nat
hi : Nat.succ i < List.length (n :: ns)
⊢ List.get
(List.map Prod.fst
(nth xs n.val (_ : n.val < length xs) :: map (fun n => nth xs n.val (_ : n.val < length xs)) ns))
{ val := Nat.succ i, isLt := (_ : Nat.succ i < List.length (List.map Prod.fst (nths xs (n :: ns)))) } =
List.get (List.map Prod.fst xs)
{ val := (List.get (n :: ns) { val := Nat.succ i, isLt := hi }).val,
isLt := (_ : (List.get (n :: ns) { val := Nat.succ i, isLt := hi }).val < List.length (List.map Prod.fst xs)) } | η : Type u_η
dec_η : DecidableEq η
schema : Schema
α : Type u_1
β : Type u_2
xs : List (α × β)
n : Fin (length xs)
ns : List (Fin (length xs))
i : Nat
hi : Nat.succ i < List.length (n :: ns)
ih :
List.get (List.map Prod.fst (nths xs ns))
{ val := i, isLt := (_ : i < List.length (List.map Prod.fst (nths xs ns))) } =
List.get (List.map Prod.fst xs)
{ val := (List.get ns { val := i, isLt := (_ : i < List.length ns) }).val,
isLt :=
(_ : (List.get ns { val := i, isLt := (_ : i < List.length ns) }).val < List.length (List.map Prod.fst xs)) }
⊢ List.get
(List.map Prod.fst
(nth xs n.val (_ : n.val < length xs) :: map (fun n => nth xs n.val (_ : n.val < length xs)) ns))
{ val := Nat.succ i, isLt := (_ : Nat.succ i < List.length (List.map Prod.fst (nths xs (n :: ns)))) } =
List.get (List.map Prod.fst xs)
{ val := (List.get (n :: ns) { val := Nat.succ i, isLt := hi }).val,
isLt := (_ : (List.get (n :: ns) { val := Nat.succ i, isLt := hi }).val < List.length (List.map Prod.fst xs)) } |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.get_map_nths_eq_get_get | [106, 1] | [126, 11] | simp only [List.get] | η : Type u_η
dec_η : DecidableEq η
schema : Schema
α : Type u_1
β : Type u_2
xs : List (α × β)
n : Fin (length xs)
ns : List (Fin (length xs))
i : Nat
hi : Nat.succ i < List.length (n :: ns)
ih :
List.get (List.map Prod.fst (nths xs ns))
{ val := i, isLt := (_ : i < List.length (List.map Prod.fst (nths xs ns))) } =
List.get (List.map Prod.fst xs)
{ val := (List.get ns { val := i, isLt := (_ : i < List.length ns) }).val,
isLt :=
(_ : (List.get ns { val := i, isLt := (_ : i < List.length ns) }).val < List.length (List.map Prod.fst xs)) }
⊢ List.get
(List.map Prod.fst
(nth xs n.val (_ : n.val < length xs) :: map (fun n => nth xs n.val (_ : n.val < length xs)) ns))
{ val := Nat.succ i, isLt := (_ : Nat.succ i < List.length (List.map Prod.fst (nths xs (n :: ns)))) } =
List.get (List.map Prod.fst xs)
{ val := (List.get (n :: ns) { val := Nat.succ i, isLt := hi }).val,
isLt := (_ : (List.get (n :: ns) { val := Nat.succ i, isLt := hi }).val < List.length (List.map Prod.fst xs)) } | η : Type u_η
dec_η : DecidableEq η
schema : Schema
α : Type u_1
β : Type u_2
xs : List (α × β)
n : Fin (length xs)
ns : List (Fin (length xs))
i : Nat
hi : Nat.succ i < List.length (n :: ns)
ih :
List.get (List.map Prod.fst (nths xs ns))
{ val := i, isLt := (_ : i < List.length (List.map Prod.fst (nths xs ns))) } =
List.get (List.map Prod.fst xs)
{ val := (List.get ns { val := i, isLt := (_ : i < List.length ns) }).val,
isLt :=
(_ : (List.get ns { val := i, isLt := (_ : i < List.length ns) }).val < List.length (List.map Prod.fst xs)) }
⊢ List.get (List.map Prod.fst (map (fun n => nth xs n.val (_ : n.val < length xs)) ns))
{ val := i,
isLt :=
(_ :
Nat.succ i ≤ List.length (List.map Prod.fst (map (fun n => nth xs n.val (_ : n.val < length xs)) ns))) } =
List.get (List.map Prod.fst xs)
{ val := (List.get ns { val := i, isLt := (_ : Nat.succ i ≤ List.length ns) }).val,
isLt :=
(_ :
(List.get ns { val := i, isLt := (_ : Nat.succ i ≤ List.length ns) }).val <
List.length (List.map Prod.fst xs)) } |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.get_map_nths_eq_get_get | [106, 1] | [126, 11] | rw [←ih] | η : Type u_η
dec_η : DecidableEq η
schema : Schema
α : Type u_1
β : Type u_2
xs : List (α × β)
n : Fin (length xs)
ns : List (Fin (length xs))
i : Nat
hi : Nat.succ i < List.length (n :: ns)
ih :
List.get (List.map Prod.fst (nths xs ns))
{ val := i, isLt := (_ : i < List.length (List.map Prod.fst (nths xs ns))) } =
List.get (List.map Prod.fst xs)
{ val := (List.get ns { val := i, isLt := (_ : i < List.length ns) }).val,
isLt :=
(_ : (List.get ns { val := i, isLt := (_ : i < List.length ns) }).val < List.length (List.map Prod.fst xs)) }
⊢ List.get (List.map Prod.fst (map (fun n => nth xs n.val (_ : n.val < length xs)) ns))
{ val := i,
isLt :=
(_ :
Nat.succ i ≤ List.length (List.map Prod.fst (map (fun n => nth xs n.val (_ : n.val < length xs)) ns))) } =
List.get (List.map Prod.fst xs)
{ val := (List.get ns { val := i, isLt := (_ : Nat.succ i ≤ List.length ns) }).val,
isLt :=
(_ :
(List.get ns { val := i, isLt := (_ : Nat.succ i ≤ List.length ns) }).val <
List.length (List.map Prod.fst xs)) } | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.lookup_eq_lookup_append | [162, 1] | [173, 14] | intros s t c h | η : Type u_η
dec_η : DecidableEq η
schema : Schema
⊢ ∀ (s t : Schema) (c : η) (h : HasName c s),
lookup s { fst := c, snd := h } = lookup (append s t) { fst := c, snd := hasNameOfAppend h } | η : Type u_η
dec_η : DecidableEq η
schema : Schema
s t : Schema
c : η
h : HasName c s
⊢ lookup s { fst := c, snd := h } = lookup (append s t) { fst := c, snd := hasNameOfAppend h } |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.lookup_eq_lookup_append | [162, 1] | [173, 14] | induction h with
| hd =>
simp only [Schema.hasNameOfAppend]
rw [Schema.lookup_eq_1, Schema.lookup_eq_1]
| tl h' ih =>
simp only [Schema.hasNameOfAppend]
rw [Schema.lookup_eq_2, Schema.lookup_eq_2]
exact ih | η : Type u_η
dec_η : DecidableEq η
schema : Schema
s t : Schema
c : η
h : HasName c s
⊢ lookup s { fst := c, snd := h } = lookup (append s t) { fst := c, snd := hasNameOfAppend h } | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.lookup_eq_lookup_append | [162, 1] | [173, 14] | simp only [Schema.hasNameOfAppend] | case hd
η : Type u_η
dec_η : DecidableEq η
schema : Schema
s t : Schema
c c✝ : η
rs✝ : Schema
τ✝ : Type u_1
⊢ lookup ((c✝, τ✝) :: rs✝) { fst := c✝, snd := HasName.hd } =
lookup (append ((c✝, τ✝) :: rs✝) t) { fst := c✝, snd := hasNameOfAppend HasName.hd } | case hd
η : Type u_η
dec_η : DecidableEq η
schema : Schema
s t : Schema
c c✝ : η
rs✝ : Schema
τ✝ : Type u_1
⊢ lookup ((c✝, τ✝) :: rs✝) { fst := c✝, snd := HasName.hd } =
lookup (append ((c✝, τ✝) :: rs✝) t) { fst := c✝, snd := HasName.hd } |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.lookup_eq_lookup_append | [162, 1] | [173, 14] | rw [Schema.lookup_eq_1, Schema.lookup_eq_1] | case hd
η : Type u_η
dec_η : DecidableEq η
schema : Schema
s t : Schema
c c✝ : η
rs✝ : Schema
τ✝ : Type u_1
⊢ lookup ((c✝, τ✝) :: rs✝) { fst := c✝, snd := HasName.hd } =
lookup (append ((c✝, τ✝) :: rs✝) t) { fst := c✝, snd := HasName.hd } | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.lookup_eq_lookup_append | [162, 1] | [173, 14] | simp only [Schema.hasNameOfAppend] | case tl
η : Type u_η
dec_η : DecidableEq η
schema : Schema
s t : Schema
c : η
r✝ : Header
c✝ : η
rs✝ : Schema
h' : HasName c✝ rs✝
ih : lookup rs✝ { fst := c✝, snd := h' } = lookup (append rs✝ t) { fst := c✝, snd := hasNameOfAppend h' }
⊢ lookup (r✝ :: rs✝) { fst := c✝, snd := HasName.tl h' } =
lookup (append (r✝ :: rs✝) t) { fst := c✝, snd := hasNameOfAppend (HasName.tl h') } | case tl
η : Type u_η
dec_η : DecidableEq η
schema : Schema
s t : Schema
c : η
r✝ : Header
c✝ : η
rs✝ : Schema
h' : HasName c✝ rs✝
ih : lookup rs✝ { fst := c✝, snd := h' } = lookup (append rs✝ t) { fst := c✝, snd := hasNameOfAppend h' }
⊢ lookup (r✝ :: rs✝) { fst := c✝, snd := HasName.tl h' } =
lookup (append (r✝ :: rs✝) t) { fst := c✝, snd := HasName.tl (hasNameOfAppend h') } |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.lookup_eq_lookup_append | [162, 1] | [173, 14] | rw [Schema.lookup_eq_2, Schema.lookup_eq_2] | case tl
η : Type u_η
dec_η : DecidableEq η
schema : Schema
s t : Schema
c : η
r✝ : Header
c✝ : η
rs✝ : Schema
h' : HasName c✝ rs✝
ih : lookup rs✝ { fst := c✝, snd := h' } = lookup (append rs✝ t) { fst := c✝, snd := hasNameOfAppend h' }
⊢ lookup (r✝ :: rs✝) { fst := c✝, snd := HasName.tl h' } =
lookup (append (r✝ :: rs✝) t) { fst := c✝, snd := HasName.tl (hasNameOfAppend h') } | case tl
η : Type u_η
dec_η : DecidableEq η
schema : Schema
s t : Schema
c : η
r✝ : Header
c✝ : η
rs✝ : Schema
h' : HasName c✝ rs✝
ih : lookup rs✝ { fst := c✝, snd := h' } = lookup (append rs✝ t) { fst := c✝, snd := hasNameOfAppend h' }
⊢ lookup rs✝ { fst := c✝, snd := h' } = lookup (append rs✝ t) { fst := c✝, snd := hasNameOfAppend h' } |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.lookup_eq_lookup_append | [162, 1] | [173, 14] | exact ih | case tl
η : Type u_η
dec_η : DecidableEq η
schema : Schema
s t : Schema
c : η
r✝ : Header
c✝ : η
rs✝ : Schema
h' : HasName c✝ rs✝
ih : lookup rs✝ { fst := c✝, snd := h' } = lookup (append rs✝ t) { fst := c✝, snd := hasNameOfAppend h' }
⊢ lookup rs✝ { fst := c✝, snd := h' } = lookup (append rs✝ t) { fst := c✝, snd := hasNameOfAppend h' } | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.mem_map_of_HasName | [176, 1] | [184, 13] | intro sch nm h | η : Type u_η
dec_η : DecidableEq η
schema : Schema
⊢ ∀ (sch : Schema) (nm : η), HasName nm sch → nm ∈ map Prod.fst sch | η : Type u_η
dec_η : DecidableEq η
schema : Schema
sch : Schema
nm : η
h : HasName nm sch
⊢ nm ∈ map Prod.fst sch |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.mem_map_of_HasName | [176, 1] | [184, 13] | induction h with
| hd =>
apply List.Mem.head
| tl _ ih =>
apply List.Mem.tail
apply ih | η : Type u_η
dec_η : DecidableEq η
schema : Schema
sch : Schema
nm : η
h : HasName nm sch
⊢ nm ∈ map Prod.fst sch | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.mem_map_of_HasName | [176, 1] | [184, 13] | apply List.Mem.head | case hd
η : Type u_η
dec_η : DecidableEq η
schema : Schema
sch : Schema
nm c✝ : η
rs✝ : Schema
τ✝ : Type u_1
⊢ c✝ ∈ map Prod.fst ((c✝, τ✝) :: rs✝) | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.mem_map_of_HasName | [176, 1] | [184, 13] | apply List.Mem.tail | case tl
η : Type u_η
dec_η : DecidableEq η
schema : Schema
sch : Schema
nm : η
r✝ : Header
c✝ : η
rs✝ : Schema
a✝ : HasName c✝ rs✝
ih : c✝ ∈ map Prod.fst rs✝
⊢ c✝ ∈ map Prod.fst (r✝ :: rs✝) | case tl.a
η : Type u_η
dec_η : DecidableEq η
schema : Schema
sch : Schema
nm : η
r✝ : Header
c✝ : η
rs✝ : Schema
a✝ : HasName c✝ rs✝
ih : c✝ ∈ map Prod.fst rs✝
⊢ List.Mem c✝ (map Prod.fst rs✝) |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.mem_map_of_HasName | [176, 1] | [184, 13] | apply ih | case tl.a
η : Type u_η
dec_η : DecidableEq η
schema : Schema
sch : Schema
nm : η
r✝ : Header
c✝ : η
rs✝ : Schema
a✝ : HasName c✝ rs✝
ih : c✝ ∈ map Prod.fst rs✝
⊢ List.Mem c✝ (map Prod.fst rs✝) | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.retypedFromSubschema_preserves_names | [228, 1] | [239, 79] | simp only [retypedFromSubschema] | η : Type u_η
dec_η : DecidableEq η
schema : Schema
fst✝ : η
snd✝ : Type u_1
ss : List Header
nm : η
τ : Type u_1
pf : HasName (nm, τ).fst ((fst✝, snd✝) :: ss)
rs : List ((h : Header) × HasName h.fst ((fst✝, snd✝) :: ss))
⊢ names (retypedFromSubschema ({ fst := (nm, τ), snd := pf } :: rs)) = names ((fst✝, snd✝) :: ss) | η : Type u_η
dec_η : DecidableEq η
schema : Schema
fst✝ : η
snd✝ : Type u_1
ss : List Header
nm : η
τ : Type u_1
pf : HasName (nm, τ).fst ((fst✝, snd✝) :: ss)
rs : List ((h : Header) × HasName h.fst ((fst✝, snd✝) :: ss))
⊢ names (retypedFromSubschema (map (fun x => { fst := x.fst, snd := hasRetypedName x.snd }) rs)) =
names ((fst✝, snd✝) :: ss) |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.retypedFromSubschema_preserves_names | [228, 1] | [239, 79] | have := retypedFromSubschema_preserves_names (Schema.retypeColumn _ pf τ)
(Schema.map (fun ⟨h, pf⟩ => ⟨h, hasRetypedName pf⟩) rs) | η : Type u_η
dec_η : DecidableEq η
schema : Schema
fst✝ : η
snd✝ : Type u_1
ss : List Header
nm : η
τ : Type u_1
pf : HasName (nm, τ).fst ((fst✝, snd✝) :: ss)
rs : List ((h : Header) × HasName h.fst ((fst✝, snd✝) :: ss))
⊢ names (retypedFromSubschema (map (fun x => { fst := x.fst, snd := hasRetypedName x.snd }) rs)) =
names ((fst✝, snd✝) :: ss) | η : Type u_η
dec_η : DecidableEq η
schema : Schema
fst✝ : η
snd✝ : Type u_1
ss : List Header
nm : η
τ : Type u_1
pf : HasName (nm, τ).fst ((fst✝, snd✝) :: ss)
rs : List ((h : Header) × HasName h.fst ((fst✝, snd✝) :: ss))
this :
names
(retypedFromSubschema
(map
(fun x =>
match x with
| { fst := h, snd := pf_1 } => { fst := h, snd := hasRetypedName pf_1 })
rs)) =
names (retypeColumn ((fst✝, snd✝) :: ss) pf τ)
⊢ names (retypedFromSubschema (map (fun x => { fst := x.fst, snd := hasRetypedName x.snd }) rs)) =
names ((fst✝, snd✝) :: ss) |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.retypedFromSubschema_preserves_names | [228, 1] | [239, 79] | rw [this] | η : Type u_η
dec_η : DecidableEq η
schema : Schema
fst✝ : η
snd✝ : Type u_1
ss : List Header
nm : η
τ : Type u_1
pf : HasName (nm, τ).fst ((fst✝, snd✝) :: ss)
rs : List ((h : Header) × HasName h.fst ((fst✝, snd✝) :: ss))
this :
names
(retypedFromSubschema
(map
(fun x =>
match x with
| { fst := h, snd := pf_1 } => { fst := h, snd := hasRetypedName pf_1 })
rs)) =
names (retypeColumn ((fst✝, snd✝) :: ss) pf τ)
⊢ names (retypedFromSubschema (map (fun x => { fst := x.fst, snd := hasRetypedName x.snd }) rs)) =
names ((fst✝, snd✝) :: ss) | η : Type u_η
dec_η : DecidableEq η
schema : Schema
fst✝ : η
snd✝ : Type u_1
ss : List Header
nm : η
τ : Type u_1
pf : HasName (nm, τ).fst ((fst✝, snd✝) :: ss)
rs : List ((h : Header) × HasName h.fst ((fst✝, snd✝) :: ss))
this :
names
(retypedFromSubschema
(map
(fun x =>
match x with
| { fst := h, snd := pf_1 } => { fst := h, snd := hasRetypedName pf_1 })
rs)) =
names (retypeColumn ((fst✝, snd✝) :: ss) pf τ)
⊢ names (retypeColumn ((fst✝, snd✝) :: ss) pf τ) = names ((fst✝, snd✝) :: ss) |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.retypedFromSubschema_preserves_names | [228, 1] | [239, 79] | simp only [retypeColumn_preserves_names] | η : Type u_η
dec_η : DecidableEq η
schema : Schema
fst✝ : η
snd✝ : Type u_1
ss : List Header
nm : η
τ : Type u_1
pf : HasName (nm, τ).fst ((fst✝, snd✝) :: ss)
rs : List ((h : Header) × HasName h.fst ((fst✝, snd✝) :: ss))
this :
names
(retypedFromSubschema
(map
(fun x =>
match x with
| { fst := h, snd := pf_1 } => { fst := h, snd := hasRetypedName pf_1 })
rs)) =
names (retypeColumn ((fst✝, snd✝) :: ss) pf τ)
⊢ names (retypeColumn ((fst✝, snd✝) :: ss) pf τ) = names ((fst✝, snd✝) :: ss) | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.hasNameOfFromCHeaders_eq_1 | [263, 1] | [268, 46] | cases sch with
| nil => contradiction
| cons s ss => simp [hasNameOfFromCHeaders] | η : Type u_η
dec_η : DecidableEq η
schema : Schema
sch : Schema
nm : η
τ : Type u_1
hpf : HasCol (nm, τ) sch
cs : List (CertifiedHeader sch)
⊢ hasNameOfFromCHeaders HasName.hd = colImpliesName hpf | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.hasNameOfFromCHeaders_eq_1 | [263, 1] | [268, 46] | contradiction | case nil
η : Type u_η
dec_η : DecidableEq η
schema : Schema
nm : η
τ : Type u_1
hpf : HasCol (nm, τ) []
cs : List (CertifiedHeader [])
⊢ hasNameOfFromCHeaders HasName.hd = colImpliesName hpf | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.hasNameOfFromCHeaders_eq_1 | [263, 1] | [268, 46] | simp [hasNameOfFromCHeaders] | case cons
η : Type u_η
dec_η : DecidableEq η
schema : Schema
nm : η
τ : Type u_1
s : Header
ss : List Header
hpf : HasCol (nm, τ) (s :: ss)
cs : List (CertifiedHeader (s :: ss))
⊢ hasNameOfFromCHeaders HasName.hd = colImpliesName hpf | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.hasNameOfFromCHeaders_eq_2 | [270, 1] | [275, 46] | cases sch with
| nil => contradiction
| cons s ss => simp [hasNameOfFromCHeaders] | η : Type u_η
dec_η : DecidableEq η
schema : Schema
sch : Schema
hdr : Header
hpf : HasCol hdr sch
cs : List (CertifiedHeader sch)
nm : η
h : HasName nm (map Sigma.fst cs)
⊢ hasNameOfFromCHeaders (HasName.tl h) = hasNameOfFromCHeaders h | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.hasNameOfFromCHeaders_eq_2 | [270, 1] | [275, 46] | contradiction | case nil
η : Type u_η
dec_η : DecidableEq η
schema : Schema
hdr : Header
nm : η
hpf : HasCol hdr []
cs : List (CertifiedHeader [])
h : HasName nm (map Sigma.fst cs)
⊢ hasNameOfFromCHeaders (HasName.tl h) = hasNameOfFromCHeaders h | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.hasNameOfFromCHeaders_eq_2 | [270, 1] | [275, 46] | simp [hasNameOfFromCHeaders] | case cons
η : Type u_η
dec_η : DecidableEq η
schema : Schema
hdr : Header
nm : η
s : Header
ss : List Header
hpf : HasCol hdr (s :: ss)
cs : List (CertifiedHeader (s :: ss))
h : HasName nm (map Sigma.fst cs)
⊢ hasNameOfFromCHeaders (HasName.tl h) = hasNameOfFromCHeaders h | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.lookupTypeFromCHeadersUnique | [290, 1] | [311, 51] | simp only [lookupType] | η : Type u_η
dec_η : DecidableEq η
schema : Schema
nm : η
τ : Type u_1
hs : List Header
cs : List (CertifiedHeader ((nm, τ) :: hs))
⊢ lookupType ((nm, τ) :: hs)
{ fst := { fst := nm, snd := HasName.hd }.fst,
snd := hasNameOfFromCHeaders { fst := nm, snd := HasName.hd }.snd } =
lookupType (fromCHeaders ({ fst := (nm, τ), snd := HasCol.hd } :: cs)) { fst := nm, snd := HasName.hd } | η : Type u_η
dec_η : DecidableEq η
schema : Schema
nm : η
τ : Type u_1
hs : List Header
cs : List (CertifiedHeader ((nm, τ) :: hs))
⊢ lookupType ((nm, τ) :: hs) { fst := nm, snd := hasNameOfFromCHeaders HasName.hd } = τ |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.lookupTypeFromCHeadersUnique | [290, 1] | [311, 51] | simp only [hasNameOfFromCHeaders_eq_1] | η : Type u_η
dec_η : DecidableEq η
schema : Schema
nm : η
τ : Type u_1
hs : List Header
cs : List (CertifiedHeader ((nm, τ) :: hs))
⊢ lookupType ((nm, τ) :: hs) { fst := nm, snd := hasNameOfFromCHeaders HasName.hd } = τ | η : Type u_η
dec_η : DecidableEq η
schema : Schema
nm : η
τ : Type u_1
hs : List Header
cs : List (CertifiedHeader ((nm, τ) :: hs))
⊢ lookupType ((nm, τ) :: hs) { fst := nm, snd := colImpliesName HasCol.hd } = τ |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.lookupTypeFromCHeadersUnique | [290, 1] | [311, 51] | rw [@colImpliesName_eq_1 η hs (nm, τ)] | η : Type u_η
dec_η : DecidableEq η
schema : Schema
nm : η
τ : Type u_1
hs : List Header
cs : List (CertifiedHeader ((nm, τ) :: hs))
⊢ lookupType ((nm, τ) :: hs) { fst := nm, snd := colImpliesName HasCol.hd } = τ | η : Type u_η
dec_η : DecidableEq η
schema : Schema
nm : η
τ : Type u_1
hs : List Header
cs : List (CertifiedHeader ((nm, τ) :: hs))
⊢ lookupType ((nm, τ) :: hs) { fst := nm, snd := HasName.hd } = τ |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.lookupTypeFromCHeadersUnique | [290, 1] | [311, 51] | simp only [lookupType] | η : Type u_η
dec_η : DecidableEq η
schema : Schema
nm : η
τ : Type u_1
hs : List Header
cs : List (CertifiedHeader ((nm, τ) :: hs))
⊢ lookupType ((nm, τ) :: hs) { fst := nm, snd := HasName.hd } = τ | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.lookupTypeFromCHeadersUnique | [290, 1] | [311, 51] | simp only [lookupType] | η : Type u_η
dec_η : DecidableEq η
schema : Schema
nm : η
τ : Type u_1
hs : List Header
ch_nm : η
ch_τ : Type u_1
h : HasCol (ch_nm, ch_τ) hs
cs : List (CertifiedHeader ((nm, τ) :: hs))
⊢ lookupType ((nm, τ) :: hs)
{ fst := { fst := ch_nm, snd := HasName.hd }.fst,
snd := hasNameOfFromCHeaders { fst := ch_nm, snd := HasName.hd }.snd } =
lookupType (fromCHeaders ({ fst := (ch_nm, ch_τ), snd := HasCol.tl h } :: cs)) { fst := ch_nm, snd := HasName.hd } | η : Type u_η
dec_η : DecidableEq η
schema : Schema
nm : η
τ : Type u_1
hs : List Header
ch_nm : η
ch_τ : Type u_1
h : HasCol (ch_nm, ch_τ) hs
cs : List (CertifiedHeader ((nm, τ) :: hs))
⊢ lookupType ((nm, τ) :: hs) { fst := ch_nm, snd := hasNameOfFromCHeaders HasName.hd } = ch_τ |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.lookupTypeFromCHeadersUnique | [290, 1] | [311, 51] | simp only [hasNameOfFromCHeaders_eq_1] | η : Type u_η
dec_η : DecidableEq η
schema : Schema
nm : η
τ : Type u_1
hs : List Header
ch_nm : η
ch_τ : Type u_1
h : HasCol (ch_nm, ch_τ) hs
cs : List (CertifiedHeader ((nm, τ) :: hs))
⊢ lookupType ((nm, τ) :: hs) { fst := ch_nm, snd := hasNameOfFromCHeaders HasName.hd } = ch_τ | η : Type u_η
dec_η : DecidableEq η
schema : Schema
nm : η
τ : Type u_1
hs : List Header
ch_nm : η
ch_τ : Type u_1
h : HasCol (ch_nm, ch_τ) hs
cs : List (CertifiedHeader ((nm, τ) :: hs))
⊢ lookupType ((nm, τ) :: hs) { fst := ch_nm, snd := colImpliesName (HasCol.tl h) } = ch_τ |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.lookupTypeFromCHeadersUnique | [290, 1] | [311, 51] | rw [@colImpliesName_eq_2 η hs (nm, τ) (ch_nm, ch_τ) h] | η : Type u_η
dec_η : DecidableEq η
schema : Schema
nm : η
τ : Type u_1
hs : List Header
ch_nm : η
ch_τ : Type u_1
h : HasCol (ch_nm, ch_τ) hs
cs : List (CertifiedHeader ((nm, τ) :: hs))
⊢ lookupType ((nm, τ) :: hs) { fst := ch_nm, snd := colImpliesName (HasCol.tl h) } = ch_τ | η : Type u_η
dec_η : DecidableEq η
schema : Schema
nm : η
τ : Type u_1
hs : List Header
ch_nm : η
ch_τ : Type u_1
h : HasCol (ch_nm, ch_τ) hs
cs : List (CertifiedHeader ((nm, τ) :: hs))
⊢ lookupType ((nm, τ) :: hs) { fst := ch_nm, snd := HasName.tl (colImpliesName h) } = ch_τ |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.lookupTypeFromCHeadersUnique | [290, 1] | [311, 51] | simp only [lookupType] | η : Type u_η
dec_η : DecidableEq η
schema : Schema
nm : η
τ : Type u_1
hs : List Header
ch_nm : η
ch_τ : Type u_1
h : HasCol (ch_nm, ch_τ) hs
cs : List (CertifiedHeader ((nm, τ) :: hs))
⊢ lookupType ((nm, τ) :: hs) { fst := ch_nm, snd := HasName.tl (colImpliesName h) } = ch_τ | η : Type u_η
dec_η : DecidableEq η
schema : Schema
nm : η
τ : Type u_1
hs : List Header
ch_nm : η
ch_τ : Type u_1
h : HasCol (ch_nm, ch_τ) hs
cs : List (CertifiedHeader ((nm, τ) :: hs))
⊢ lookupType hs { fst := ch_nm, snd := colImpliesName h } = ch_τ |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.lookupTypeFromCHeadersUnique | [290, 1] | [311, 51] | apply lookupType_of_colImpliesName | η : Type u_η
dec_η : DecidableEq η
schema : Schema
nm : η
τ : Type u_1
hs : List Header
ch_nm : η
ch_τ : Type u_1
h : HasCol (ch_nm, ch_τ) hs
cs : List (CertifiedHeader ((nm, τ) :: hs))
⊢ lookupType hs { fst := ch_nm, snd := colImpliesName h } = ch_τ | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.lookupTypeFromCHeadersUnique | [290, 1] | [311, 51] | simp only [lookupType] | η : Type u_η
dec_η : DecidableEq η
schema : Schema
nm : η
τ : Type u_1
hs : List Header
fst✝ : Header
pf : HasCol fst✝ ((nm, τ) :: hs)
cs : List (CertifiedHeader ((nm, τ) :: hs))
s_nm : η
hn : HasName s_nm (map Sigma.fst cs)
⊢ lookupType ((nm, τ) :: hs)
{ fst := { fst := s_nm, snd := HasName.tl hn }.fst,
snd := hasNameOfFromCHeaders { fst := s_nm, snd := HasName.tl hn }.snd } =
lookupType (fromCHeaders ({ fst := fst✝, snd := pf } :: cs)) { fst := s_nm, snd := HasName.tl hn } | η : Type u_η
dec_η : DecidableEq η
schema : Schema
nm : η
τ : Type u_1
hs : List Header
fst✝ : Header
pf : HasCol fst✝ ((nm, τ) :: hs)
cs : List (CertifiedHeader ((nm, τ) :: hs))
s_nm : η
hn : HasName s_nm (map Sigma.fst cs)
⊢ lookupType ((nm, τ) :: hs) { fst := s_nm, snd := hasNameOfFromCHeaders (HasName.tl hn) } =
lookupType (map Sigma.fst cs) { fst := s_nm, snd := hn } |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.lookupTypeFromCHeadersUnique | [290, 1] | [311, 51] | simp only [hasNameOfFromCHeaders_eq_2] | η : Type u_η
dec_η : DecidableEq η
schema : Schema
nm : η
τ : Type u_1
hs : List Header
fst✝ : Header
pf : HasCol fst✝ ((nm, τ) :: hs)
cs : List (CertifiedHeader ((nm, τ) :: hs))
s_nm : η
hn : HasName s_nm (map Sigma.fst cs)
⊢ lookupType ((nm, τ) :: hs) { fst := s_nm, snd := hasNameOfFromCHeaders (HasName.tl hn) } =
lookupType (map Sigma.fst cs) { fst := s_nm, snd := hn } | η : Type u_η
dec_η : DecidableEq η
schema : Schema
nm : η
τ : Type u_1
hs : List Header
fst✝ : Header
pf : HasCol fst✝ ((nm, τ) :: hs)
cs : List (CertifiedHeader ((nm, τ) :: hs))
s_nm : η
hn : HasName s_nm (map Sigma.fst cs)
⊢ lookupType ((nm, τ) :: hs) { fst := s_nm, snd := hasNameOfFromCHeaders hn } =
lookupType (map Sigma.fst cs) { fst := s_nm, snd := hn } |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.lookupTypeFromCHeadersUnique | [290, 1] | [311, 51] | exact lookupTypeFromCHeadersUnique cs ⟨s_nm, hn⟩ | η : Type u_η
dec_η : DecidableEq η
schema : Schema
nm : η
τ : Type u_1
hs : List Header
fst✝ : Header
pf : HasCol fst✝ ((nm, τ) :: hs)
cs : List (CertifiedHeader ((nm, τ) :: hs))
s_nm : η
hn : HasName s_nm (map Sigma.fst cs)
⊢ lookupType ((nm, τ) :: hs) { fst := s_nm, snd := hasNameOfFromCHeaders hn } =
lookupType (map Sigma.fst cs) { fst := s_nm, snd := hn } | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.hasNameEqHeadOrTail_inl | [352, 1] | [358, 18] | intro eqt | η : Type u_η
dec_η : DecidableEq η
schema : Schema
η✝ : Type u_1
nm : η✝
τ : Type u_2
hs : List Header
h : HasName nm ((nm, τ) :: hs)
⊢ hasNameEqHeadOrTail h ≡ Sum.inl (EqT.refl nm) → h = HasName.hd | η : Type u_η
dec_η : DecidableEq η
schema : Schema
η✝ : Type u_1
nm : η✝
τ : Type u_2
hs : List Header
h : HasName nm ((nm, τ) :: hs)
eqt : hasNameEqHeadOrTail h ≡ Sum.inl (EqT.refl nm)
⊢ h = HasName.hd |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.hasNameEqHeadOrTail_inl | [352, 1] | [358, 18] | simp only [hasNameEqHeadOrTail] at eqt | η : Type u_η
dec_η : DecidableEq η
schema : Schema
η✝ : Type u_1
nm : η✝
τ : Type u_2
hs : List Header
h : HasName nm ((nm, τ) :: hs)
eqt : hasNameEqHeadOrTail h ≡ Sum.inl (EqT.refl nm)
⊢ h = HasName.hd | η : Type u_η
dec_η : DecidableEq η
schema : Schema
η✝ : Type u_1
nm : η✝
τ : Type u_2
hs : List Header
h : HasName nm ((nm, τ) :: hs)
eqt :
(match nm, hs, h with
| .(nm), x, HasName.hd => Sum.inl (EqT.refl nm)
| x, x_1, HasName.tl htl => Sum.inr htl) ≡
Sum.inl (EqT.refl nm)
⊢ h = HasName.hd |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.hasNameEqHeadOrTail_inl | [352, 1] | [358, 18] | cases h | η : Type u_η
dec_η : DecidableEq η
schema : Schema
η✝ : Type u_1
nm : η✝
τ : Type u_2
hs : List Header
h : HasName nm ((nm, τ) :: hs)
eqt :
(match nm, hs, h with
| .(nm), x, HasName.hd => Sum.inl (EqT.refl nm)
| x, x_1, HasName.tl htl => Sum.inr htl) ≡
Sum.inl (EqT.refl nm)
⊢ h = HasName.hd | case hd
η : Type u_η
dec_η : DecidableEq η
schema : Schema
η✝ : Type u_1
nm : η✝
τ : Type u_2
hs : List Header
eqt :
(match nm, hs, HasName.hd with
| .(nm), x, HasName.hd => Sum.inl (EqT.refl nm)
| x, x_1, HasName.tl htl => Sum.inr htl) ≡
Sum.inl (EqT.refl nm)
⊢ HasName.hd = HasName.hd
case tl
η : Type u_η
dec_η : DecidableEq η
schema : Schema
η✝ : Type u_1
nm : η✝
τ : Type u_2
hs : List Header
a✝ : HasName nm hs
eqt :
(match nm, hs, HasName.tl a✝ with
| .(nm), x, HasName.hd => Sum.inl (EqT.refl nm)
| x, x_1, HasName.tl htl => Sum.inr htl) ≡
Sum.inl (EqT.refl nm)
⊢ HasName.tl a✝ = HasName.hd |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.hasNameEqHeadOrTail_inl | [352, 1] | [358, 18] | . rfl | case hd
η : Type u_η
dec_η : DecidableEq η
schema : Schema
η✝ : Type u_1
nm : η✝
τ : Type u_2
hs : List Header
eqt :
(match nm, hs, HasName.hd with
| .(nm), x, HasName.hd => Sum.inl (EqT.refl nm)
| x, x_1, HasName.tl htl => Sum.inr htl) ≡
Sum.inl (EqT.refl nm)
⊢ HasName.hd = HasName.hd
case tl
η : Type u_η
dec_η : DecidableEq η
schema : Schema
η✝ : Type u_1
nm : η✝
τ : Type u_2
hs : List Header
a✝ : HasName nm hs
eqt :
(match nm, hs, HasName.tl a✝ with
| .(nm), x, HasName.hd => Sum.inl (EqT.refl nm)
| x, x_1, HasName.tl htl => Sum.inr htl) ≡
Sum.inl (EqT.refl nm)
⊢ HasName.tl a✝ = HasName.hd | case tl
η : Type u_η
dec_η : DecidableEq η
schema : Schema
η✝ : Type u_1
nm : η✝
τ : Type u_2
hs : List Header
a✝ : HasName nm hs
eqt :
(match nm, hs, HasName.tl a✝ with
| .(nm), x, HasName.hd => Sum.inl (EqT.refl nm)
| x, x_1, HasName.tl htl => Sum.inr htl) ≡
Sum.inl (EqT.refl nm)
⊢ HasName.tl a✝ = HasName.hd |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.hasNameEqHeadOrTail_inl | [352, 1] | [358, 18] | . contradiction | case tl
η : Type u_η
dec_η : DecidableEq η
schema : Schema
η✝ : Type u_1
nm : η✝
τ : Type u_2
hs : List Header
a✝ : HasName nm hs
eqt :
(match nm, hs, HasName.tl a✝ with
| .(nm), x, HasName.hd => Sum.inl (EqT.refl nm)
| x, x_1, HasName.tl htl => Sum.inr htl) ≡
Sum.inl (EqT.refl nm)
⊢ HasName.tl a✝ = HasName.hd | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.hasNameEqHeadOrTail_inl | [352, 1] | [358, 18] | rfl | case hd
η : Type u_η
dec_η : DecidableEq η
schema : Schema
η✝ : Type u_1
nm : η✝
τ : Type u_2
hs : List Header
eqt :
(match nm, hs, HasName.hd with
| .(nm), x, HasName.hd => Sum.inl (EqT.refl nm)
| x, x_1, HasName.tl htl => Sum.inr htl) ≡
Sum.inl (EqT.refl nm)
⊢ HasName.hd = HasName.hd | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.hasNameEqHeadOrTail_inl | [352, 1] | [358, 18] | contradiction | case tl
η : Type u_η
dec_η : DecidableEq η
schema : Schema
η✝ : Type u_1
nm : η✝
τ : Type u_2
hs : List Header
a✝ : HasName nm hs
eqt :
(match nm, hs, HasName.tl a✝ with
| .(nm), x, HasName.hd => Sum.inl (EqT.refl nm)
| x, x_1, HasName.tl htl => Sum.inr htl) ≡
Sum.inl (EqT.refl nm)
⊢ HasName.tl a✝ = HasName.hd | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.hasNameEqHeadOrTail_inr | [360, 1] | [370, 8] | intro eqt | η : Type u_η
dec_η : DecidableEq η
schema : Schema
η✝ : Type u_1
nm : η✝
h✝ : Header
hs : List Header
h : HasName nm (h✝ :: hs)
htl : HasName nm hs
⊢ hasNameEqHeadOrTail h ≡ Sum.inr htl → h = HasName.tl htl | η : Type u_η
dec_η : DecidableEq η
schema : Schema
η✝ : Type u_1
nm : η✝
h✝ : Header
hs : List Header
h : HasName nm (h✝ :: hs)
htl : HasName nm hs
eqt : hasNameEqHeadOrTail h ≡ Sum.inr htl
⊢ h = HasName.tl htl |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.hasNameEqHeadOrTail_inr | [360, 1] | [370, 8] | simp only [hasNameEqHeadOrTail] at eqt | η : Type u_η
dec_η : DecidableEq η
schema : Schema
η✝ : Type u_1
nm : η✝
h✝ : Header
hs : List Header
h : HasName nm (h✝ :: hs)
htl : HasName nm hs
eqt : hasNameEqHeadOrTail h ≡ Sum.inr htl
⊢ h = HasName.tl htl | η : Type u_η
dec_η : DecidableEq η
schema : Schema
η✝ : Type u_1
nm : η✝
h✝ : Header
hs : List Header
h : HasName nm (h✝ :: hs)
htl : HasName nm hs
eqt :
(match nm, hs, h with
| .(h✝.fst), x, HasName.hd => Sum.inl (EqT.refl h✝.fst)
| x, x_1, HasName.tl htl => Sum.inr htl) ≡
Sum.inr htl
⊢ h = HasName.tl htl |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.hasNameEqHeadOrTail_inr | [360, 1] | [370, 8] | cases h | η : Type u_η
dec_η : DecidableEq η
schema : Schema
η✝ : Type u_1
nm : η✝
h✝ : Header
hs : List Header
h : HasName nm (h✝ :: hs)
htl : HasName nm hs
eqt :
(match nm, hs, h with
| .(h✝.fst), x, HasName.hd => Sum.inl (EqT.refl h✝.fst)
| x, x_1, HasName.tl htl => Sum.inr htl) ≡
Sum.inr htl
⊢ h = HasName.tl htl | case hd
η : Type u_η
dec_η : DecidableEq η
schema : Schema
η✝ : Type u_1
nm : η✝
hs : List Header
htl : HasName nm hs
τ✝ : Type u_2
eqt :
(match nm, hs, HasName.hd with
| .((nm, τ✝).fst), x, HasName.hd => Sum.inl (EqT.refl (nm, τ✝).fst)
| x, x_1, HasName.tl htl => Sum.inr htl) ≡
Sum.inr htl
⊢ HasName.hd = HasName.tl htl
case tl
η : Type u_η
dec_η : DecidableEq η
schema : Schema
η✝ : Type u_1
nm : η✝
h : Header
hs : List Header
htl a✝ : HasName nm hs
eqt :
(match nm, hs, HasName.tl a✝ with
| .(h.fst), x, HasName.hd => Sum.inl (EqT.refl h.fst)
| x, x_1, HasName.tl htl => Sum.inr htl) ≡
Sum.inr htl
⊢ HasName.tl a✝ = HasName.tl htl |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.hasNameEqHeadOrTail_inr | [360, 1] | [370, 8] | . contradiction | case hd
η : Type u_η
dec_η : DecidableEq η
schema : Schema
η✝ : Type u_1
nm : η✝
hs : List Header
htl : HasName nm hs
τ✝ : Type u_2
eqt :
(match nm, hs, HasName.hd with
| .((nm, τ✝).fst), x, HasName.hd => Sum.inl (EqT.refl (nm, τ✝).fst)
| x, x_1, HasName.tl htl => Sum.inr htl) ≡
Sum.inr htl
⊢ HasName.hd = HasName.tl htl
case tl
η : Type u_η
dec_η : DecidableEq η
schema : Schema
η✝ : Type u_1
nm : η✝
h : Header
hs : List Header
htl a✝ : HasName nm hs
eqt :
(match nm, hs, HasName.tl a✝ with
| .(h.fst), x, HasName.hd => Sum.inl (EqT.refl h.fst)
| x, x_1, HasName.tl htl => Sum.inr htl) ≡
Sum.inr htl
⊢ HasName.tl a✝ = HasName.tl htl | case tl
η : Type u_η
dec_η : DecidableEq η
schema : Schema
η✝ : Type u_1
nm : η✝
h : Header
hs : List Header
htl a✝ : HasName nm hs
eqt :
(match nm, hs, HasName.tl a✝ with
| .(h.fst), x, HasName.hd => Sum.inl (EqT.refl h.fst)
| x, x_1, HasName.tl htl => Sum.inr htl) ≡
Sum.inr htl
⊢ HasName.tl a✝ = HasName.tl htl |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.hasNameEqHeadOrTail_inr | [360, 1] | [370, 8] | . simp only at eqt
cases eqt
rfl | case tl
η : Type u_η
dec_η : DecidableEq η
schema : Schema
η✝ : Type u_1
nm : η✝
h : Header
hs : List Header
htl a✝ : HasName nm hs
eqt :
(match nm, hs, HasName.tl a✝ with
| .(h.fst), x, HasName.hd => Sum.inl (EqT.refl h.fst)
| x, x_1, HasName.tl htl => Sum.inr htl) ≡
Sum.inr htl
⊢ HasName.tl a✝ = HasName.tl htl | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.hasNameEqHeadOrTail_inr | [360, 1] | [370, 8] | contradiction | case hd
η : Type u_η
dec_η : DecidableEq η
schema : Schema
η✝ : Type u_1
nm : η✝
hs : List Header
htl : HasName nm hs
τ✝ : Type u_2
eqt :
(match nm, hs, HasName.hd with
| .((nm, τ✝).fst), x, HasName.hd => Sum.inl (EqT.refl (nm, τ✝).fst)
| x, x_1, HasName.tl htl => Sum.inr htl) ≡
Sum.inr htl
⊢ HasName.hd = HasName.tl htl | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.hasNameEqHeadOrTail_inr | [360, 1] | [370, 8] | simp only at eqt | case tl
η : Type u_η
dec_η : DecidableEq η
schema : Schema
η✝ : Type u_1
nm : η✝
h : Header
hs : List Header
htl a✝ : HasName nm hs
eqt :
(match nm, hs, HasName.tl a✝ with
| .(h.fst), x, HasName.hd => Sum.inl (EqT.refl h.fst)
| x, x_1, HasName.tl htl => Sum.inr htl) ≡
Sum.inr htl
⊢ HasName.tl a✝ = HasName.tl htl | case tl
η : Type u_η
dec_η : DecidableEq η
schema : Schema
η✝ : Type u_1
nm : η✝
h : Header
hs : List Header
htl a✝ : HasName nm hs
eqt : Sum.inr a✝ ≡ Sum.inr htl
⊢ HasName.tl a✝ = HasName.tl htl |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.hasNameEqHeadOrTail_inr | [360, 1] | [370, 8] | cases eqt | case tl
η : Type u_η
dec_η : DecidableEq η
schema : Schema
η✝ : Type u_1
nm : η✝
h : Header
hs : List Header
htl a✝ : HasName nm hs
eqt : Sum.inr a✝ ≡ Sum.inr htl
⊢ HasName.tl a✝ = HasName.tl htl | case tl.refl
η : Type u_η
dec_η : DecidableEq η
schema : Schema
η✝ : Type u_1
nm : η✝
h : Header
hs : List Header
htl : HasName nm hs
⊢ HasName.tl htl = HasName.tl htl |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.hasNameEqHeadOrTail_inr | [360, 1] | [370, 8] | rfl | case tl.refl
η : Type u_η
dec_η : DecidableEq η
schema : Schema
η✝ : Type u_1
nm : η✝
h : Header
hs : List Header
htl : HasName nm hs
⊢ HasName.tl htl = HasName.tl htl | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.lookupType_nths_eq_lookupType | [372, 1] | [413, 28] | simp only [Schema.lookupType] | η : Type u_η
dec_η : DecidableEq η
schema : Schema
snm : η
sτ : Type u_1
sch : List Header
hlt : 0 < length ((snm, sτ) :: sch)
ns : List (Fin (length ((snm, sτ) :: sch)))
⊢ lookupType (nths ((snm, sτ) :: sch) ({ val := 0, isLt := hlt } :: ns)) { fst := snm, snd := HasName.hd } =
lookupType ((snm, sτ) :: sch) { fst := snm, snd := hasNameOfNthsHasName HasName.hd } | η : Type u_η
dec_η : DecidableEq η
schema : Schema
snm : η
sτ : Type u_1
sch : List Header
hlt : 0 < length ((snm, sτ) :: sch)
ns : List (Fin (length ((snm, sτ) :: sch)))
⊢ sτ = lookupType ((snm, sτ) :: sch) { fst := snm, snd := hasNameOfNthsHasName HasName.hd } |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.lookupType_nths_eq_lookupType | [372, 1] | [413, 28] | unfold Schema.hasNameOfNthsHasName | η : Type u_η
dec_η : DecidableEq η
schema : Schema
snm : η
sτ : Type u_1
sch : List Header
hlt : 0 < length ((snm, sτ) :: sch)
ns : List (Fin (length ((snm, sτ) :: sch)))
⊢ sτ = lookupType ((snm, sτ) :: sch) { fst := snm, snd := hasNameOfNthsHasName HasName.hd } | η : Type u_η
dec_η : DecidableEq η
schema : Schema
snm : η
sτ : Type u_1
sch : List Header
hlt : 0 < length ((snm, sτ) :: sch)
ns : List (Fin (length ((snm, sτ) :: sch)))
⊢ sτ =
lookupType ((snm, sτ) :: sch)
{ fst := snm,
snd :=
match snm, hasNameEqHeadOrTail HasName.hd, HasName.hd with
|
.((nth ((snm, sτ) :: sch) { val := 0, isLt := hlt }.val
(_ : { val := 0, isLt := hlt }.val < length ((snm, sτ) :: sch))).fst),
Sum.inl
(EqT.refl
.((nth ((snm, sτ) :: sch) { val := 0, isLt := hlt }.val
(_ : { val := 0, isLt := hlt }.val < length ((snm, sτ) :: sch))).fst)),
h => hasNthName { val := 0, isLt := hlt }
| hdr, Sum.inr hhnm, h => hasNameOfNthsHasName hhnm } |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.lookupType_nths_eq_lookupType | [372, 1] | [413, 28] | simp only [Schema.hasNameEqHeadOrTail, Schema.hasNthName, Schema.lookupType] | η : Type u_η
dec_η : DecidableEq η
schema : Schema
snm : η
sτ : Type u_1
sch : List Header
hlt : 0 < length ((snm, sτ) :: sch)
ns : List (Fin (length ((snm, sτ) :: sch)))
⊢ sτ =
lookupType ((snm, sτ) :: sch)
{ fst := snm,
snd :=
match snm, hasNameEqHeadOrTail HasName.hd, HasName.hd with
|
.((nth ((snm, sτ) :: sch) { val := 0, isLt := hlt }.val
(_ : { val := 0, isLt := hlt }.val < length ((snm, sτ) :: sch))).fst),
Sum.inl
(EqT.refl
.((nth ((snm, sτ) :: sch) { val := 0, isLt := hlt }.val
(_ : { val := 0, isLt := hlt }.val < length ((snm, sτ) :: sch))).fst)),
h => hasNthName { val := 0, isLt := hlt }
| hdr, Sum.inr hhnm, h => hasNameOfNthsHasName hhnm } | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.lookupType_nths_eq_lookupType | [372, 1] | [413, 28] | conv =>
lhs
simp only [Schema.nths, Schema.map, Schema.lookupType] | η : Type u_η
dec_η : DecidableEq η
schema : Schema
snm : η
sτ : Type u_1
sch : List Header
hlt : 0 < length ((snm, sτ) :: sch)
ns : List (Fin (length ((snm, sτ) :: sch)))
nm : η
h : HasName nm (map (fun n => nth ((snm, sτ) :: sch) n.val (_ : n.val < length ((snm, sτ) :: sch))) ns)
⊢ lookupType (nths ((snm, sτ) :: sch) ({ val := 0, isLt := hlt } :: ns)) { fst := nm, snd := HasName.tl h } =
lookupType ((snm, sτ) :: sch) { fst := nm, snd := hasNameOfNthsHasName (HasName.tl h) } | η : Type u_η
dec_η : DecidableEq η
schema : Schema
snm : η
sτ : Type u_1
sch : List Header
hlt : 0 < length ((snm, sτ) :: sch)
ns : List (Fin (length ((snm, sτ) :: sch)))
nm : η
h : HasName nm (map (fun n => nth ((snm, sτ) :: sch) n.val (_ : n.val < length ((snm, sτ) :: sch))) ns)
⊢ lookupType (map (fun n => nth ((snm, sτ) :: sch) n.val (_ : n.val < length ((snm, sτ) :: sch))) ns)
{ fst := nm, snd := h } =
lookupType ((snm, sτ) :: sch) { fst := nm, snd := hasNameOfNthsHasName (HasName.tl h) } |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.lookupType_nths_eq_lookupType | [372, 1] | [413, 28] | conv =>
rhs
unfold Schema.hasNameOfNthsHasName
simp only [Schema.hasNameEqHeadOrTail] | η : Type u_η
dec_η : DecidableEq η
schema : Schema
snm : η
sτ : Type u_1
sch : List Header
hlt : 0 < length ((snm, sτ) :: sch)
ns : List (Fin (length ((snm, sτ) :: sch)))
nm : η
h : HasName nm (map (fun n => nth ((snm, sτ) :: sch) n.val (_ : n.val < length ((snm, sτ) :: sch))) ns)
⊢ lookupType (map (fun n => nth ((snm, sτ) :: sch) n.val (_ : n.val < length ((snm, sτ) :: sch))) ns)
{ fst := nm, snd := h } =
lookupType ((snm, sτ) :: sch) { fst := nm, snd := hasNameOfNthsHasName (HasName.tl h) } | η : Type u_η
dec_η : DecidableEq η
schema : Schema
snm : η
sτ : Type u_1
sch : List Header
hlt : 0 < length ((snm, sτ) :: sch)
ns : List (Fin (length ((snm, sτ) :: sch)))
nm : η
h : HasName nm (map (fun n => nth ((snm, sτ) :: sch) n.val (_ : n.val < length ((snm, sτ) :: sch))) ns)
⊢ lookupType (map (fun n => nth ((snm, sτ) :: sch) n.val (_ : n.val < length ((snm, sτ) :: sch))) ns)
{ fst := nm, snd := h } =
lookupType ((snm, sτ) :: sch) { fst := nm, snd := hasNameOfNthsHasName h } |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.lookupType_nths_eq_lookupType | [372, 1] | [413, 28] | apply lookupType_nths_eq_lookupType | η : Type u_η
dec_η : DecidableEq η
schema : Schema
snm : η
sτ : Type u_1
sch : List Header
hlt : 0 < length ((snm, sτ) :: sch)
ns : List (Fin (length ((snm, sτ) :: sch)))
nm : η
h : HasName nm (map (fun n => nth ((snm, sτ) :: sch) n.val (_ : n.val < length ((snm, sτ) :: sch))) ns)
⊢ lookupType (map (fun n => nth ((snm, sτ) :: sch) n.val (_ : n.val < length ((snm, sτ) :: sch))) ns)
{ fst := nm, snd := h } =
lookupType ((snm, sτ) :: sch) { fst := nm, snd := hasNameOfNthsHasName h } | no goals |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.lookupType_nths_eq_lookupType | [372, 1] | [413, 28] | conv =>
rhs
unfold Schema.hasNameOfNthsHasName
simp only [h] | η : Type u_η
dec_η : DecidableEq η
schema : Schema
snm : η
sτ : Type u_1
sch : List Header
n : Nat
pf : Nat.succ n < length ((snm, sτ) :: sch)
ns : List (Fin (length ((snm, sτ) :: sch)))
nm : η
hnths : HasName nm (nths ((snm, sτ) :: sch) ({ val := Nat.succ n, isLt := pf } :: ns))
hhnm : HasName nm (map (fun n => nth ((snm, sτ) :: sch) n.val (_ : n.val < length ((snm, sτ) :: sch))) ns)
h : hasNameEqHeadOrTail hnths = Sum.inr hhnm
⊢ lookupType (nths ((snm, sτ) :: sch) ({ val := Nat.succ n, isLt := pf } :: ns)) { fst := nm, snd := hnths } =
lookupType ((snm, sτ) :: sch) { fst := nm, snd := hasNameOfNthsHasName hnths } | η : Type u_η
dec_η : DecidableEq η
schema : Schema
snm : η
sτ : Type u_1
sch : List Header
n : Nat
pf : Nat.succ n < length ((snm, sτ) :: sch)
ns : List (Fin (length ((snm, sτ) :: sch)))
nm : η
hnths : HasName nm (nths ((snm, sτ) :: sch) ({ val := Nat.succ n, isLt := pf } :: ns))
hhnm : HasName nm (map (fun n => nth ((snm, sτ) :: sch) n.val (_ : n.val < length ((snm, sτ) :: sch))) ns)
h : hasNameEqHeadOrTail hnths = Sum.inr hhnm
⊢ lookupType (nths ((snm, sτ) :: sch) ({ val := Nat.succ n, isLt := pf } :: ns)) { fst := nm, snd := hnths } =
lookupType ((snm, sτ) :: sch) { fst := nm, snd := hasNameOfNthsHasName hhnm } |
https://github.com/jrr6/lean-tables.git | 7dfa8308e13cb7b15296cc63fa2cbd26c0d0f712 | Table/SchemaFunctions.lean | Schema.lookupType_nths_eq_lookupType | [372, 1] | [413, 28] | have htoprove : hnths = .tl hhnm :=
Schema.hasNameEqHeadOrTail_inr _ _ (EqT.ofEq h) | η : Type u_η
dec_η : DecidableEq η
schema : Schema
snm : η
sτ : Type u_1
sch : List Header
n : Nat
pf : Nat.succ n < length ((snm, sτ) :: sch)
ns : List (Fin (length ((snm, sτ) :: sch)))
nm : η
hnths : HasName nm (nths ((snm, sτ) :: sch) ({ val := Nat.succ n, isLt := pf } :: ns))
hhnm : HasName nm (map (fun n => nth ((snm, sτ) :: sch) n.val (_ : n.val < length ((snm, sτ) :: sch))) ns)
h : hasNameEqHeadOrTail hnths = Sum.inr hhnm
⊢ lookupType (nths ((snm, sτ) :: sch) ({ val := Nat.succ n, isLt := pf } :: ns)) { fst := nm, snd := hnths } =
lookupType ((snm, sτ) :: sch) { fst := nm, snd := hasNameOfNthsHasName hhnm } | η : Type u_η
dec_η : DecidableEq η
schema : Schema
snm : η
sτ : Type u_1
sch : List Header
n : Nat
pf : Nat.succ n < length ((snm, sτ) :: sch)
ns : List (Fin (length ((snm, sτ) :: sch)))
nm : η
hnths : HasName nm (nths ((snm, sτ) :: sch) ({ val := Nat.succ n, isLt := pf } :: ns))
hhnm : HasName nm (map (fun n => nth ((snm, sτ) :: sch) n.val (_ : n.val < length ((snm, sτ) :: sch))) ns)
h : hasNameEqHeadOrTail hnths = Sum.inr hhnm
htoprove : hnths = HasName.tl hhnm
⊢ lookupType (nths ((snm, sτ) :: sch) ({ val := Nat.succ n, isLt := pf } :: ns)) { fst := nm, snd := hnths } =
lookupType ((snm, sτ) :: sch) { fst := nm, snd := hasNameOfNthsHasName hhnm } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.