@@ -101,7 +101,7 @@ begin
101
101
intros j hjn hj1,
102
102
obtain rfl : j = 0 , { linarith },
103
103
refine congr_arg v _,
104
- rw [fin.ext_iff, fin.cast_le_val , composition.ones_embedding],
104
+ rw [fin.ext_iff, fin.coe_cast_le , composition.ones_embedding, fin.coe_mk ],
105
105
end
106
106
107
107
/-- Technical lemma stating how `p.apply_composition` commutes with updating variables. This
@@ -295,7 +295,7 @@ begin
295
295
intros,
296
296
rw apply_composition_ones,
297
297
refine congr_arg v _,
298
- rw [fin.ext_iff, fin.cast_le_val ], },
298
+ rw [fin.ext_iff, fin.coe_cast_le, fin.coe_mk, fin.coe_mk ], },
299
299
show ∀ (b : composition n),
300
300
b ∈ finset.univ → b ≠ composition.ones n → comp_along_composition p (id 𝕜 E) b = 0 ,
301
301
{ assume b _ hb,
@@ -520,13 +520,13 @@ end
520
520
lemma comp_change_of_variables_blocks_fun
521
521
(N : ℕ) {i : Σ n, (fin n) → ℕ} (hi : i ∈ comp_partial_sum_source N) (j : fin i.1 ) :
522
522
(comp_change_of_variables N i hi).2 .blocks_fun
523
- ⟨j.val , (comp_change_of_variables_length N hi).symm ▸ j.2 ⟩ = i.2 j :=
523
+ ⟨j, (comp_change_of_variables_length N hi).symm ▸ j.2 ⟩ = i.2 j :=
524
524
begin
525
525
rcases i with ⟨n, f⟩,
526
526
dsimp [composition.blocks_fun, composition.blocks, comp_change_of_variables],
527
527
simp only [map_of_fn, nth_le_of_fn', function.comp_app],
528
528
apply congr_arg,
529
- rw fin.ext_iff
529
+ rw [ fin.ext_iff, fin.mk_coe]
530
530
end
531
531
532
532
/-- Target set in the change of variables to compute the composition of partial sums of formal
@@ -546,7 +546,8 @@ begin
546
546
{ dsimp [comp_change_of_variables],
547
547
rw composition.sigma_eq_iff_blocks_eq,
548
548
simp only [composition.blocks_fun, composition.blocks, subtype.coe_eta, nth_le_map'],
549
- conv_lhs { rw ← of_fn_nth_le c.blocks } }
549
+ conv_lhs { rw ← of_fn_nth_le c.blocks },
550
+ simp only [fin.val_eq_coe], refl, /- where does this fin.val come from? -/ }
550
551
end
551
552
552
553
/-- Target set in the change of variables to compute the composition of partial sums of formal
@@ -861,8 +862,8 @@ begin
861
862
induction h,
862
863
simp only [true_and, eq_self_iff_true, heq_iff_eq],
863
864
ext i : 2 ,
864
- have : nth_le (of_fn (λ (i : fin (composition.length a)), (b i).blocks)) i. 1 (by simp [i.2 ]) =
865
- nth_le (of_fn (λ (i : fin (composition.length a)), (b' i).blocks)) i. 1 (by simp [i.2 ]) :=
865
+ have : nth_le (of_fn (λ (i : fin (composition.length a)), (b i).blocks)) i (by simp [i.is_lt ]) =
866
+ nth_le (of_fn (λ (i : fin (composition.length a)), (b' i).blocks)) i (by simp [i.is_lt ]) :=
866
867
nth_le_of_eq H _,
867
868
rwa [nth_le_of_fn, nth_le_of_fn] at this
868
869
end
@@ -899,22 +900,23 @@ two compositions `a` of `n` and `b` of `a.length`, and an index `i` bounded by t
899
900
def sigma_composition_aux (a : composition n) (b : composition a.length)
900
901
(i : fin (a.gather b).length) :
901
902
composition ((a.gather b).blocks_fun i) :=
902
- { blocks := nth_le (a.blocks.split_wrt_composition b) i.val
903
+ { blocks := nth_le (a.blocks.split_wrt_composition b) i
903
904
(by { rw [length_split_wrt_composition, ← length_gather], exact i.2 }),
904
905
blocks_pos := assume i hi, a.blocks_pos
905
906
(by { rw ← a.blocks.join_split_wrt_composition b, exact mem_join_of_mem (nth_le_mem _ _ _) hi }),
906
- blocks_sum := by simp only [composition.blocks_fun, nth_le_map', composition.gather] }
907
+ blocks_sum := by simp only [composition.blocks_fun, nth_le_map', composition.gather, fin.val_eq_coe] }
908
+ /- Where did the fin.val come from in the proof on the preceding line? -/
907
909
908
910
lemma length_sigma_composition_aux (a : composition n) (b : composition a.length) (i : fin b.length) :
909
- composition.length (composition.sigma_composition_aux a b ⟨i.val , (length_gather a b).symm ▸ i.2 ⟩) =
911
+ composition.length (composition.sigma_composition_aux a b ⟨i, (length_gather a b).symm ▸ i.2 ⟩) =
910
912
composition.blocks_fun b i :=
911
- show list.length (nth_le (split_wrt_composition a.blocks b) i.val _) = blocks_fun b i,
913
+ show list.length (nth_le (split_wrt_composition a.blocks b) i _) = blocks_fun b i,
912
914
by { rw [nth_le_map_rev list.length, nth_le_of_eq (map_length_split_wrt_composition _ _)], refl }
913
915
914
916
lemma blocks_fun_sigma_composition_aux (a : composition n) (b : composition a.length)
915
917
(i : fin b.length) (j : fin (blocks_fun b i)) :
916
- blocks_fun (sigma_composition_aux a b ⟨i.val , (length_gather a b).symm ▸ i.2 ⟩)
917
- ⟨j.val , (length_sigma_composition_aux a b i).symm ▸ j.2 ⟩ = blocks_fun a (embedding b i j) :=
918
+ blocks_fun (sigma_composition_aux a b ⟨i, (length_gather a b).symm ▸ i.2 ⟩)
919
+ ⟨j, (length_sigma_composition_aux a b i).symm ▸ j.2 ⟩ = blocks_fun a (embedding b i j) :=
918
920
show nth_le (nth_le _ _ _) _ _ = nth_le a.blocks _ _,
919
921
by { rw [nth_le_of_eq (nth_le_split_wrt_composition _ _ _), nth_le_drop', nth_le_take'], refl }
920
922
@@ -951,14 +953,14 @@ begin
951
953
rw [take_append_drop] } },
952
954
{ have A : j < blocks_fun b ⟨i, hi⟩ := lt_trans (lt_add_one j) hj,
953
955
have B : j < length (sigma_composition_aux a b ⟨i, (length_gather a b).symm ▸ hi⟩),
954
- by { convert A, rw ← length_sigma_composition_aux },
956
+ by { convert A, rw [ ← length_sigma_composition_aux], refl },
955
957
have C : size_up_to b i + j < size_up_to b (i + 1 ),
956
958
{ simp only [size_up_to_succ b hi, add_lt_add_iff_left],
957
959
exact A },
958
960
have D : size_up_to b i + j < length a := lt_of_lt_of_le C (b.size_up_to_le _),
959
961
have : size_up_to b i + nat.succ j = (size_up_to b i + j).succ := rfl,
960
962
rw [this , size_up_to_succ _ D, IHj A, size_up_to_succ _ B],
961
- simp only [sigma_composition_aux, add_assoc, add_left_inj],
963
+ simp only [sigma_composition_aux, add_assoc, add_left_inj, fin.coe_mk ],
962
964
rw [nth_le_of_eq (nth_le_split_wrt_composition _ _ _), nth_le_drop', nth_le_take _ _ C] }
963
965
end
964
966
@@ -1014,7 +1016,7 @@ def sigma_equiv_sigma_pi (n : ℕ) :
1014
1016
{ exact B },
1015
1017
{ apply (fin.heq_fun_iff B).2 (λ i, _),
1016
1018
rw [sigma_composition_aux, composition.length, nth_le_map_rev list.length,
1017
- nth_le_of_eq (map_length_split_wrt_composition _ _)] } }
1019
+ nth_le_of_eq (map_length_split_wrt_composition _ _)], refl } }
1018
1020
end ,
1019
1021
right_inv :=
1020
1022
begin
0 commit comments