Skip to content

Instantly share code, notes, and snippets.

@vlj
Last active February 10, 2020 18:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vlj/be8041d11efc4b5d30ff5f5723051ebe to your computer and use it in GitHub Desktop.
Save vlj/be8041d11efc4b5d30ff5f5723051ebe to your computer and use it in GitHub Desktop.
From mathcomp Require Import ssreflect ssrbool ssrfun eqtype ssrnat seq choice path.
From mathcomp Require Import div fintype tuple finfun bigop finset fingroup perm.
From mathcomp Require Import div prime binomial ssralg finalg zmodp countalg ssrnum falgebra.
From mathcomp Require Import ssrint matrix algC.
Set Implicit Arguments.
Unset Strict Implicit.
Unset Printing Implicit Defensive.
Local Open Scope ring_scope.
Definition test_kernel :=
\matrix_(i < 3%N, j < 3%N) 1%:Z.
Lemma tmp0 n (T:ringType) (f: 'I_n -> T):
\sum_(i<n) f i = foldr (+%R) 0%R (map f (ord_enum n)).
Proof.
rewrite !unlock /reducebig /index_enum /applybig => //=.
rewrite !unlock /comp => //=.
by rewrite foldr_map.
Qed.
Example tmp j:
\sum_i (test_kernel i j) = 3.
Proof.
rewrite /test_kernel /test_image.
rewrite tmp0.
rewrite /ord_enum => //=.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment