This repository was archived by the owner on Jul 24, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -938,6 +938,10 @@ def append {α : Type*} {o : ℕ} (ho : o = m + n) (u : fin m → α) (v : fin n
938
938
then u ⟨i, h⟩
939
939
else v ⟨(i : ℕ) - m, (nat.sub_lt_left_iff_lt_add (le_of_not_lt h)).2 (ho ▸ i.property)⟩
940
940
941
+ @[simp] lemma fin_append_apply_zero {α : Type *} {o : ℕ} (ho : (o + 1 ) = (m + 1 ) + n)
942
+ (u : fin (m + 1 ) → α) (v : fin n → α) :
943
+ fin.append ho u v 0 = u 0 := rfl
944
+
941
945
end tuple
942
946
943
947
section tuple_right
Original file line number Diff line number Diff line change @@ -76,6 +76,8 @@ by { ext i, fin_cases i }
76
76
77
77
section val
78
78
79
+ @[simp] lemma head_fin_const (a : α) : vec_head (λ (i : fin (n + 1 )), a) = a := rfl
80
+
79
81
@[simp] lemma cons_val_zero (x : α) (u : fin m → α) : vec_cons x u 0 = x := rfl
80
82
81
83
lemma cons_val_zero' (h : 0 < m.succ) (x : α) (u : fin m → α) :
@@ -211,6 +213,12 @@ begin
211
213
exact nat.add_succ_lt_add i.property i.property } }
212
214
end
213
215
216
+ @[simp] lemma vec_head_vec_alt0 (hm : (m + 2 ) = (n + 1 ) + (n + 1 )) (v : fin (m + 2 ) → α) :
217
+ vec_head (vec_alt0 hm v) = v 0 := rfl
218
+
219
+ @[simp] lemma vec_head_vec_alt1 (hm : (m + 2 ) = (n + 1 ) + (n + 1 )) (v : fin (m + 2 ) → α) :
220
+ vec_head (vec_alt1 hm v) = v 1 := rfl
221
+
214
222
@[simp] lemma cons_vec_bit0_eq_alt0 (x : α) (u : fin n → α) (i : fin (n + 1 )) :
215
223
vec_cons x u (bit0 i) = vec_alt0 rfl (fin.append rfl (vec_cons x u) (vec_cons x u)) i :=
216
224
by rw vec_alt0_append
You can’t perform that action at this time.
0 commit comments