File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -172,6 +172,16 @@ finToNat_mult_linearity (FS x) y {a=S i} = rewrite finToNat_plus_linearity y (x
172
172
rewrite finToNat_mult_linearity x y in
173
173
Refl
174
174
175
+ export
176
+ plus_preserves_last : (a, b : Nat ) -> Fin .last {n=a} + Fin .last {n=b} = Fin .last
177
+ plus_preserves_last Z b = rewrite weakenNZero_preserves $ Fin . last {n= b} in Refl
178
+ plus_preserves_last (S k) b = rewrite plus_preserves_last k b in Refl
179
+
180
+ export
181
+ mult_preserves_last : (a, b : Nat ) -> Fin .last {n=a} * Fin .last {n=b} = Fin .last
182
+ mult_preserves_last Z b = Refl
183
+ mult_preserves_last (S k) b = rewrite mult_preserves_last k b in plus_preserves_last _ _
184
+
175
185
export
176
186
plusSuccRightSucc : {a, b : Nat } -> (left : Fin $ S a) -> (right : Fin $ S b) -> FS (left + right) = rewrite plusSuccRightSucc a b in left + FS right
177
187
plusSuccRightSucc FZ right = rewrite plusCommutative a b in Refl
You can’t perform that action at this time.
0 commit comments