Skip to content

Commit 827e452

Browse files
committed
[WIP] replace the infrastructure of mpoly with monalg
1 parent f2c8bf5 commit 827e452

File tree

2 files changed

+262
-241
lines changed

2 files changed

+262
-241
lines changed

src/monalg.v

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Reserved Notation "<< k >>" (format "<< k >>").
4444
Reserved Notation "g @_ k"
4545
(at level 3, k at level 2, left associativity, format "g @_ k").
4646
Reserved Notation "c %:MP" (format "c %:MP").
47-
Reserved Notation "''X_{1..' n '}'".
47+
Reserved Notation "''X_{1..' n '}'" (n at level 2).
4848
Reserved Notation "'U_(' n )" (format "'U_(' n )").
4949
Reserved Notation "x ^[ f , g ]" (at level 1, format "x ^[ f , g ]").
5050

@@ -1389,6 +1389,8 @@ Canonical cmonom_unlockable k := [unlockable fun cmonom_of_fsfun k].
13891389

13901390
End CmonomDef.
13911391

1392+
Bind Scope monom_scope with cmonom.
1393+
13921394
Notation "{ 'cmonom' I }" := (cmonom I) : type_scope.
13931395
Notation "''X_{1..' n '}'" := (cmonom 'I_n) : type_scope.
13941396
Notation "{ 'mpoly' R [ n ] }" := {malg R['X_{1..n}]} : type_scope.
@@ -1413,7 +1415,7 @@ Implicit Types (m : cmonom I).
14131415
Lemma cmE (f : {fsfun of _ : I => 0%N}) : mkcmonom f =1 CMonom f.
14141416
Proof. by rewrite unlock. Qed.
14151417

1416-
Lemma cmP m1 m2 : reflect (forall i, m1 i = m2 i) (m1 == m2).
1418+
Lemma cmP m1 m2 : reflect (m1 =1 m2) (m1 == m2).
14171419
Proof. by apply: (iffP eqP) => [->//|eq]; apply/val_inj/fsfunP. Qed.
14181420

14191421
Definition onecm : cmonom I := mkcmonom [fsfun of _ => 0%N].
@@ -1465,6 +1467,8 @@ HB.instance Definition _ := MonomialDef_isConomialDef.Build (cmonom I) mulcmC.
14651467

14661468
End CmonomCanonicals.
14671469

1470+
HB.instance Definition _ (I : countType) := [Countable of cmonom I by <:].
1471+
14681472
(* -------------------------------------------------------------------- *)
14691473
Definition mdeg {I : choiceType} (m : cmonom I) :=
14701474
(\sum_(k <- finsupp m) m k)%N.
@@ -1659,6 +1663,8 @@ Canonical fmonom_unlockable k := [unlockable fun fmonom_of_seq k].
16591663

16601664
End FmonomDef.
16611665

1666+
Bind Scope monom_scope with fmonom.
1667+
16621668
Notation "{ 'fmonom' I }" := (fmonom I) : type_scope.
16631669

16641670
Local Notation mkfmonom s := (fmonom_of_seq fmonom_key s).
@@ -1715,6 +1721,8 @@ HB.instance Definition _ := Choice_isMonomialDef.Build (fmonom I)
17151721

17161722
End FmonomCanonicals.
17171723

1724+
HB.instance Definition _ (I : countType) := [Countable of fmonom I by <:].
1725+
17181726
(* -------------------------------------------------------------------- *)
17191727
Definition fdeg (I : choiceType) (m : fmonom I) := size m.
17201728

0 commit comments

Comments
 (0)