Skip to content

Commit

Permalink
Better examples about reduction modulo p
Browse files Browse the repository at this point in the history
  • Loading branch information
CohenCyril committed Mar 29, 2024
1 parent 670f46f commit 2d30ab8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion elpi/param.elpi
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ param
).

% TrocqConv for F (argument B in param.args) + TrocqApp
param (app [F|Xs]) B (app [F'|Xs']) (W AppR) :- std.spy-do! [
param (app [F|Xs]) B (app [F'|Xs']) (W AppR) :- std.do! [
util.when-debug dbg.steps (coq.say "param/app" F Xs "@" B),
annot.typecheck F FTy,
fresh-type => param F FTy F' FR,
Expand Down
6 changes: 3 additions & 3 deletions examples/flt3_step.v
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ Notation "x * y" := (mulp x%Zmod9 y%Zmod9) : Zmod9_scope.
Notation not A := (A -> Empty).
Notation "m ^ 2" := (m * m)%int (at level 2) : int_scope.
Notation "m ^ 2" := (m * m)%Zmod9 (at level 2) : Zmod9_scope.
Notation "m ^ 3" := (m * m * m)%int (at level 2) : int_scope.
Notation "m ^ 3" := (m * m * m)%Zmod9 (at level 2) : Zmod9_scope.
Notation "m ³" := (m * m * m)%int (at level 2) : int_scope.
Notation "m ³" := (m * m * m)%Zmod9 (at level 2) : Zmod9_scope.
Notation "m % 3" := (mod3 m)%int (at level 2) : int_scope.
Notation "m % 3" := (modp3 m)%Zmod9 (at level 2) : Zmod9_scope.
Notation "x ≡ y" := (eqmodp x%int y%int)
Expand All @@ -91,7 +91,7 @@ Trocq Use Rp Rmul Rzero Rone Radd Rmod3 Param10_paths Reqmodp01.
Trocq Use Param01_sum Param01_Empty Param10_Empty.

Lemma flt3_step : forall (m n p : ℤ),
m * n * p % 3 ≢ 0 -> (m^3 + n^3)%ℤ ≠ p^3%ℤ.
m * n * p % 3 ≢ 0 -> (m³ + n³)%ℤ ≠ p³%ℤ.
Proof.
trocq=> /=.
Admitted.

0 comments on commit 2d30ab8

Please sign in to comment.