From 1152118ec851c87655eebb5dd407c10d8fc93575 Mon Sep 17 00:00:00 2001 From: Abhishek Anand Date: Sun, 31 Aug 2014 19:19:46 -0400 Subject: [PATCH 01/20] Update CSumsReals.v fixed a minor typo --- reals/CSumsReals.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reals/CSumsReals.v b/reals/CSumsReals.v index 9eb86a17..e7dfb4fd 100644 --- a/reals/CSumsReals.v +++ b/reals/CSumsReals.v @@ -43,7 +43,7 @@ Require Export CReals1. %\end{convention}% Here we prove that -$\Sigma_{m\leq i \leq n}~c^k = \frac{c^{n+1}-c^m}{c-1}.$ +$\Sigma_{m\leq i \leq n}~c^i = \frac{c^{n+1}-c^m}{c-1}.$ #sum_(m≤ i ≤ n) c^k = frac (c^(n+1) -c^m) (c-1)# *) From 72696f3167542f03acb82c671654f3aacbf04bb0 Mon Sep 17 00:00:00 2001 From: Guillaume Claret Date: Mon, 22 Sep 2014 00:03:09 +0200 Subject: [PATCH 02/20] Math Classes Git module removed, SCons replaced by Coq Makefile --- .gitignore | 2 + .gitmodules | 4 - Make | 374 +++++++++++++++++++++++++++++++++++++++++++++++++++ SConstruct | 41 ------ configure.sh | 2 + math-classes | 1 - 6 files changed, 378 insertions(+), 46 deletions(-) delete mode 100644 .gitmodules create mode 100644 Make delete mode 100644 SConstruct create mode 100755 configure.sh delete mode 160000 math-classes diff --git a/.gitignore b/.gitignore index a1ed2b8e..71be1a78 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +Makefile +Makefile.bak *.vo *.d *.glob diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 342bd5fd..00000000 --- a/.gitmodules +++ /dev/null @@ -1,4 +0,0 @@ -[submodule "math-classes"] - path = math-classes -# url = git://github.com/EvgenyMakarov/math-classes.git - url = git://github.com/math-classes/math-classes.git diff --git a/Make b/Make new file mode 100644 index 00000000..e5df97ff --- /dev/null +++ b/Make @@ -0,0 +1,374 @@ +# Library name +-R . CoRN + +# Coq files +algebra/Bernstein.v +algebra/CFields.v +algebra/COrdCauchy.v +algebra/CPoly_ApZero.v +algebra/CRing_as_Ring.v +algebra/CSetoidFun.v +algebra/Expon.v +algebra/CAbGroups.v +algebra/CGroups.v +algebra/COrdFields2.v +algebra/CPoly_Degree.v +algebra/CRing_Homomorphisms.v +algebra/CSetoidInc.v +algebra/OperationClasses.v +algebra/CAbMonoids.v +algebra/CMonoids.v +algebra/COrdFields.v +algebra/CPolynomials.v +algebra/CRings.v +algebra/CSetoids.v +algebra/RSetoid.v +algebra/Cauchy_COF.v +algebra/COrdAbs.v +algebra/CornScope.v +algebra/CPoly_NthCoeff.v +algebra/CSemiGroups.v +algebra/CSums.v + +classes/Qclasses.v +classes/Qposclasses.v + +complex/AbsCC.v +complex/CComplex.v +complex/Complex_Exponential.v +complex/NRootCC.v + +coq_reals/Rreals_iso.v +coq_reals/Rreals.v +coq_reals/Rsign.v + +examples/Calculemus2011.v +examples/Circle.v +examples/IntegrationExamples.v +examples/LMCS2011.v +examples/PlotExamples.v +examples/RealFaster.v +examples/RealFast.v + +fta/CC_Props.v +fta/CPoly_Contin1.v +fta/CPoly_Rev.v +fta/CPoly_Shift.v +fta/FTAreg.v +fta/FTA.v +fta/KeyLemma.v +fta/KneserLemma.v +fta/MainLemma.v + +ftc/CalculusTheorems.v +ftc/Composition.v +ftc/Continuity.v +ftc/COrdLemmas.v +ftc/DerivativeOps.v +ftc/Derivative.v +ftc/Differentiability.v +ftc/FTC.v +ftc/FunctSequence.v +ftc/FunctSeries.v +ftc/FunctSums.v +ftc/Integral.v +ftc/IntegrationRules.v +ftc/IntervalFunct.v +ftc/MoreFunctions.v +ftc/MoreFunSeries.v +ftc/MoreIntegrals.v +ftc/MoreIntervals.v +ftc/NthDerivative.v +ftc/PartFunEquality.v +ftc/PartInterval.v +ftc/Partitions.v +ftc/RefLemma.v +ftc/RefSeparated.v +ftc/RefSeparating.v +ftc/RefSepRef.v +ftc/Rolle.v +ftc/StrongIVT.v +ftc/TaylorLemma.v +ftc/Taylor.v +ftc/WeakIVT.v + +logic/Classic.v +logic/CLogic.v +logic/CornBasics.v +logic/PropDecid.v +logic/Stability.v + +metric2/Classification.v +metric2/Compact.v +metric2/CompletePointFree.v +metric2/CompleteProduct.v +metric2/Complete.v +metric2/DistanceMetricSpace.v +metric2/FinEnum.v +metric2/Graph.v +metric2/Hausdorff.v +metric2/Limit.v +metric2/MetricMorphisms.v +metric2/Metric.v +metric2/Prelength.v +metric2/ProductMetric.v +metric2/StepFunctionMonad.v +metric2/StepFunctionSetoid.v +metric2/StepFunction.v +metric2/UCFnMonoid.v +metric2/UniformContinuity.v + +metrics/CMetricSpaces.v +metrics/ContFunctions.v +metrics/CPMSTheory.v +metrics/CPseudoMSpaces.v +metrics/Equiv.v +metrics/IR_CPMSpace.v +metrics/LipExt.v +metrics/Prod_Sub.v + +model/abgroups/CRabgroup.v +model/abgroups/Qabgroup.v +model/abgroups/Qposabgroup.v +model/abgroups/QSposabgroup.v +model/abgroups/Zabgroup.v + +model/fields/CRfield.v +model/fields/Qfield.v + +model/groups/CRgroup.v +model/groups/Qgroup.v +model/groups/Qposgroup.v +model/groups/QSposgroup.v +model/groups/Zgroup.v + +model/lattice/CRlattice.v + +model/metric2/BoundedFunction.v +model/metric2/CRmetric.v +model/metric2/IntegrableFunction.v +model/metric2/L1metric.v +model/metric2/LinfDistMonad.v +model/metric2/LinfMetricMonad.v +model/metric2/LinfMetric.v +model/metric2/Qmetric.v + +model/monoids/CRmonoid.v +model/monoids/freem_to_Nm.v +model/monoids/Nmonoid.v +model/monoids/Nm_to_cycm.v +model/monoids/Nm_to_freem.v +model/monoids/Nposmonoid.v +model/monoids/Qmonoid.v +model/monoids/Qposmonoid.v +model/monoids/QSposmonoid.v +model/monoids/Zmonoid.v + +model/ordfields/CRordfield.v +model/ordfields/Qordfield.v + +model/partialorder/CRpartialorder.v + +model/reals/Cauchy_IR.v +model/reals/CRreal.v + +model/rings/CRring.v +model/rings/Qring.v +model/rings/Zring.v + +model/semigroups/CRsemigroup.v +model/semigroups/Npossemigroup.v +model/semigroups/Nsemigroup.v +model/semigroups/Qpossemigroup.v +model/semigroups/Qsemigroup.v +model/semigroups/QSpossemigroup.v +model/semigroups/Zsemigroup.v + +model/setoids/CRsetoid.v +model/setoids/decsetoid.v +model/setoids/Nfinsetoid.v +model/setoids/Npossetoid.v +model/setoids/Nsetoid.v +model/setoids/Qpossetoid.v +model/setoids/Qsetoid.v +model/setoids/Zfinsetoid.v +model/setoids/Zsetoid.v + +model/structures/NNUpperR.v +model/structures/Npossec.v +model/structures/Nsec.v +model/structures/OpenUnit.v +model/structures/Qinf.v +model/structures/QnnInf.v +model/structures/QnonNeg.v +model/structures/QposInf.v +model/structures/Qpossec.v +model/structures/Qsec.v +model/structures/StepQsec.v +model/structures/Zsec.v + +model/totalorder/QMinMax.v +model/totalorder/QposMinMax.v +model/totalorder/ZMinMax.v + +model/Zmod/Cmod.v +model/Zmod/IrrCrit.v +model/Zmod/ZBasics.v +model/Zmod/ZDivides.v +model/Zmod/ZGcd.v +model/Zmod/ZMod.v +model/Zmod/Zm.v + +ode/AbstractIntegration.v +ode/BanachFixpoint.v +ode/FromMetric2.v +ode/metric.v +ode/Picard.v +ode/SimpleIntegration.v + +old/CHomomorphism_Theorems.v +old/CIdeals.v +old/CModule_Homomorphisms.v +old/CModules.v +old/CMonoidCyc.v +old/CQuotient_Modules.v +old/CQuotient_Rings.v +old/CVectorSpace.v +old/N_no_group.v +old/Npos_no_group.v +old/Npos_no_monoid.v +old/Transparent_algebra.v +old/twoelemmonoid.v +old/twoelemsemigroup.v +old/twoelemsetoid.v + +order/Lattice.v +order/PartialOrder.v +order/SemiLattice.v +order/TotalOrder.v + +raster/Raster.v + +reals/Bridges_iso.v +reals/Bridges_LUB.v +reals/Cauchy_CReals.v +reals/CauchySeq.v +reals/Cesaro.v +reals/CMetricFields.v +reals/CPoly_Contin.v +reals/CReals1.v +reals/CReals.v +reals/CSumsReals.v +reals/fast +reals/faster +reals/Intervals.v +reals/iso_CReals.v +reals/IVT.v +reals/Max_AbsIR.v +reals/NRootIR.v +reals/OddPolyRootIR.v +reals/PosSeq.v +reals/Q_dense.v +reals/Q_in_CReals.v +reals/RealCount.v +reals/RealFuncts.v +reals/RealLists.v +reals/R_morphism.v +reals/Series.v + +reals/fast/Compress.v +reals/fast/ContinuousCorrect.v +reals/fast/CRabs.v +reals/fast/CRAlternatingSum.v +reals/fast/CRarctan_small.v +reals/fast/CRarctan.v +reals/fast/CRArith.v +reals/fast/CRartanh_slow.v +reals/fast/CRball.v +reals/fast/CRconst.v +reals/fast/CRcorrect.v +reals/fast/CRcos.v +reals/fast/CRexp.v +reals/fast/CRFieldOps.v +reals/fast/CRGeometricSum.v +reals/fast/CRGroupOps.v +reals/fast/CRIR.v +reals/fast/CRln.v +reals/fast/CRpi_fast.v +reals/fast/CRpi_slow.v +reals/fast/CRpi.v +reals/fast/CRpower.v +reals/fast/CRroot.v +reals/fast/CRseries.v +reals/fast/CRsign.v +reals/fast/CRsin.v +reals/fast/CRsum.v +reals/fast/CRtrans.v +reals/fast/Integration.v +reals/fast/Interval.v +reals/fast/LazyNat.v +reals/fast/ModulusDerivative.v +reals/fast/MultivariatePolynomials.v +reals/fast/Plot.v +reals/fast/PowerBound.v +reals/fast/RasterizeQ.v +reals/fast/RasterQ.v +reals/fast/uneven_CRplus.v + +reals/faster/ApproximateRationals.v +reals/faster/AQmetric.v +reals/faster/ARAlternatingSum.v +reals/faster/ARarctan_small.v +reals/faster/ARarctan.v +reals/faster/ARArith.v +reals/faster/ARbigD.v +reals/faster/ARbigQ.v +reals/faster/ARcos.v +reals/faster/ARexp.v +reals/faster/ARpi.v +reals/faster/ARQ.v +reals/faster/ARroot.v +reals/faster/ARsign.v +reals/faster/ARsin.v +reals/faster/ARtrans.v + +stdlib_omissions/List.v +stdlib_omissions/N.v +stdlib_omissions/Pair.v +stdlib_omissions/P.v +stdlib_omissions/Q.v +stdlib_omissions/Z.v + +tactics/AlgReflection.v +tactics/CornTac.v +tactics/csetoid_rewrite.v +tactics/DiffTactics1.v +tactics/DiffTactics2.v +tactics/DiffTactics3.v +tactics/FieldReflection.v +tactics/Opaque_algebra.v +tactics/Qauto.v +tactics/rational.ml +tactics/Rational.v +tactics/RingReflection.v +tactics/Step.v + +transc/ArTanH.v +transc/Exponential.v +transc/InvTrigonom.v +transc/MoreArcTan.v +transc/Pi.v +transc/PowerSeries.v +transc/RealPowers.v +transc/SinCos.v +transc/TaylorSeries.v +transc/TrigMon.v +transc/Trigonometric.v + +util/Container.v +util/Extract.v +util/PointFree.v +util/Qdlog.v +util/Qgcd.v +util/Qsums.v +util/SetoidPermutation.v \ No newline at end of file diff --git a/SConstruct b/SConstruct deleted file mode 100644 index fe9cf2e9..00000000 --- a/SConstruct +++ /dev/null @@ -1,41 +0,0 @@ -import os, glob, string - -# Removing examples directory since we do not need it every time. -dirs_to_compile = ['algebra', 'complex', 'coq_reals', 'fta', 'ftc', 'logic', 'metrics', 'model', 'raster', 'reals', 'tactics', 'transc', 'order', 'metric2', 'Liouville', 'stdlib_omissions', 'util', 'classes', 'ode'] - -nodes = map(lambda x: './' + x, dirs_to_compile) -dirs = [] -vs = [] - -env = DefaultEnvironment(ENV = os.environ, tools=['default', 'Coq']) - -while nodes: - node = nodes.pop() - b = os.path.basename(node) - if (node.endswith('.v') - and not b.startswith('Opaque_') - and not b.startswith('Transparent_')): - vs += [File(node)] - if os.path.isdir(node): - dirs += [node] - nodes += glob.glob(node + '/*') - -includes = ' '.join(map(lambda x: '-I ' + x, dirs[1:])) -Rs = '-R . CoRN -R math-classes/src MathClasses' -coqcmd = 'coqc ${str(SOURCE)[:-2]} ' + Rs - -env['COQFLAGS'] = Rs - -for node in vs: env.Coq(node, COQCMD=coqcmd) - -mc_vs, mc_vos, mc_globs = env.SConscript(dirs='math-classes/src') - -os.system('coqdep ' + ' '.join(map(str, vs+mc_vs)) + ' ' + includes + ' ' + Rs + ' > deps') -ParseDepends('deps') - -open('coqidescript', 'w').write('#!/bin/sh\ncoqide ' + Rs + ' $@ \n') -os.chmod('coqidescript', 0755) - -env.CoqDoc(env.Dir('coqdoc'), vs+mc_vs, COQDOCFLAGS='-utf8 --toc -g --no-lib-name --coqlib http://coq.inria.fr/library') - -#env.Command('deps.dot', [], 'tools/DepsToDot.hs < deps > $TARGET') diff --git a/configure.sh b/configure.sh new file mode 100755 index 00000000..b9d12ab6 --- /dev/null +++ b/configure.sh @@ -0,0 +1,2 @@ +#!/usr/bin/env sh +coq_makefile -f Make -o Makefile \ No newline at end of file diff --git a/math-classes b/math-classes deleted file mode 160000 index ec6d10d9..00000000 --- a/math-classes +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ec6d10d98c432a8fbf9c251647c8dae17de14f62 From 437eda3c44e488da9b7d40b17cc6238840eadcac Mon Sep 17 00:00:00 2001 From: Guillaume Claret Date: Mon, 22 Sep 2014 02:18:13 +0200 Subject: [PATCH 03/20] Non-compiling files removed --- Make | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/Make b/Make index e5df97ff..dc06117f 100644 --- a/Make +++ b/Make @@ -226,22 +226,6 @@ ode/metric.v ode/Picard.v ode/SimpleIntegration.v -old/CHomomorphism_Theorems.v -old/CIdeals.v -old/CModule_Homomorphisms.v -old/CModules.v -old/CMonoidCyc.v -old/CQuotient_Modules.v -old/CQuotient_Rings.v -old/CVectorSpace.v -old/N_no_group.v -old/Npos_no_group.v -old/Npos_no_monoid.v -old/Transparent_algebra.v -old/twoelemmonoid.v -old/twoelemsemigroup.v -old/twoelemsetoid.v - order/Lattice.v order/PartialOrder.v order/SemiLattice.v @@ -346,7 +330,7 @@ tactics/DiffTactics1.v tactics/DiffTactics2.v tactics/DiffTactics3.v tactics/FieldReflection.v -tactics/Opaque_algebra.v +#tactics/Opaque_algebra.v tactics/Qauto.v tactics/rational.ml tactics/Rational.v From dca17b0712d1501307cfad7c147355c192a43e47 Mon Sep 17 00:00:00 2001 From: Guillaume Claret Date: Mon, 22 Sep 2014 02:18:34 +0200 Subject: [PATCH 04/20] old/ folder removed --- old/CHomomorphism_Theorems.v | 346 --- old/CIdeals.v | 159 -- old/CModule_Homomorphisms.v | 176 -- old/CModules.v | 387 ---- old/CMonoidCyc.v | 4219 ---------------------------------- old/CQuotient_Modules.v | 324 --- old/CQuotient_Rings.v | 343 --- old/CVectorSpace.v | 174 -- old/N_no_group.v | 76 - old/Npos_no_group.v | 77 - old/Npos_no_monoid.v | 68 - old/Transparent_algebra.v | 60 - old/twoelemmonoid.v | 252 -- old/twoelemsemigroup.v | 171 -- old/twoelemsetoid.v | 315 --- 15 files changed, 7147 deletions(-) delete mode 100644 old/CHomomorphism_Theorems.v delete mode 100644 old/CIdeals.v delete mode 100644 old/CModule_Homomorphisms.v delete mode 100644 old/CModules.v delete mode 100644 old/CMonoidCyc.v delete mode 100644 old/CQuotient_Modules.v delete mode 100644 old/CQuotient_Rings.v delete mode 100644 old/CVectorSpace.v delete mode 100644 old/N_no_group.v delete mode 100644 old/Npos_no_group.v delete mode 100644 old/Npos_no_monoid.v delete mode 100644 old/Transparent_algebra.v delete mode 100644 old/twoelemmonoid.v delete mode 100644 old/twoelemsemigroup.v delete mode 100644 old/twoelemsetoid.v diff --git a/old/CHomomorphism_Theorems.v b/old/CHomomorphism_Theorems.v deleted file mode 100644 index 02b4e266..00000000 --- a/old/CHomomorphism_Theorems.v +++ /dev/null @@ -1,346 +0,0 @@ -(* Copyright © 1998-2006 - * Henk Barendregt - * Luís Cruz-Filipe - * Herman Geuvers - * Mariusz Giero - * Rik van Ginneken - * Dimitri Hendriks - * Sébastien Hinderer - * Bart Kirkels - * Pierre Letouzey - * Iris Loeb - * Lionel Mamane - * Milad Niqui - * Russell O’Connor - * Randy Pollack - * Nickolay V. Shmyrev - * Bas Spitters - * Dan Synek - * Freek Wiedijk - * Jan Zwanenburg - * - * This work is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This work is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this work; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) -(* Homomorphism_Theorems.v, v1.0, 28april2004, Bart Kirkels *) - -(** printing [+] %\ensuremath+% #+# *) -(** printing [*] %\ensuremath\times% #×# *) -(** printing ['] %\ensuremath.% #.# *) -(** printing [-] %\ensuremath{-}% #−# *) -(** printing [--] %\ensuremath-% #−# *) -(** printing [=] %\ensuremath=% #≡# *) -(** printing [#] %\ensuremath\#% *) -(** printing Zero %\ensuremath{\mathbf0}% #0# *) -(** printing One %\ensuremath{\mathbf1}% #1# *) -(** printing sigma %\ensuremath{\sigma}% *) -(** printing sigst %\ensuremath{\sigma^{*}}% *) -(** printing tau %\ensuremath{\tau}% *) -(** printing Rsigma %\ensuremath{\sigma}% *) -(** printing Rsigst %\ensuremath{\sigma^{*}}% *) -(** printing Rtau %\ensuremath{\tau}% *) -(** printing Cs %\ensuremath{C_{\sigma}}% *) -(** printing CsR %\ensuremath{C_{\sigma}}% *) - -Require Export CQuotient_Modules. -Require Export CModule_Homomorphisms. -Require Export CQuotient_Rings. -Require Export CRing_Homomorphisms. - -(** -* Homomorphism Theorems -** The homomorphism theorem for modules -Let [R] be a ring, [A] and [B] [R]-Modules, and [sigma] a module homomorphism -from [A] to [B]. -*** [Cs] is a comodule -We define [Cs], a comodule and prove that it really is a comodule. -*) - -Section Theorem_on_Modules. - -Variable R : CRing. - - -Section Cs_CoModule. - -Variables A B : RModule R. -Variable sigma : ModHom A B. - -Definition cspred (x:A) : CProp := (sigma x) [#] Zero. - -Definition cswdpred : (wd_pred A). -Proof. - apply (Build_wd_pred A cspred). - unfold pred_wd; intros x y. - unfold cspred; auto. - intros H0 H1. - assert ((hommap A B sigma) x [=] (hommap A B sigma) y). - apply (csf_wd A B (hommap A B sigma) x y H1). - astepl ((hommap A B sigma) x). - assumption. -Defined. - -Lemma cs_is_comod : is_comod A cswdpred. -Proof. - unfold cswdpred. - apply Build_is_comod; simpl in |-*; unfold cspred. - (* cm_apzero *) - apply mh_apzero. - (* cm_plus *) - intros x y X. - cut ((sigma x)[+](sigma y)[#]Zero). - intro X0. - apply cg_add_ap_zero; auto. - astepl (sigma (x[+]y)); algebra. - (* cm_mult *) - intros x a X. - cut ((rm_mu B)a (sigma x)[#]Zero). - intro X0. - apply (mu_axap0_xap0 R B a (sigma x)); assumption. - astepl ((hommap A B sigma) ((rm_mu A) a x)); assumption. -Qed. - -Definition cs_as_comod := Build_comod R A cswdpred cs_is_comod. - -End Cs_CoModule. - - -Variables A B : RModule R. -Variable sigma : ModHom A B. - -(** -Now we can `divide' [A] by $\lnot$#~#[Cs]. -*) - -Definition Cs := cs_as_comod A B sigma. -Definition AdivCs := quotmod_as_RModule A Cs. - -(** -We now define the functions of which we want to prove the existence. -*) - -Definition tau (x:A) := (x:AdivCs). - -(* begin hide *) -Lemma tau_strext : fun_strext tau. -Proof. - red in |-*; intros x y; unfold tau; simpl in |-*. - unfold ap_quotmod; simpl in |-*; unfold cspred. - intro X; cut ((x[-]y)[#]Zero); algebra. - apply (mh_apzero A B sigma (x[-]y)); assumption. -Qed. -(* end hide *) - -Definition tau_is_fun := Build_CSetoid_fun A AdivCs tau tau_strext. - -Lemma tau_surj : surjective tau_is_fun. -Proof. - red in |-*; intro b. - exists b. - simpl in |-*. - apply eq_quotmod_wd. - unfold tau; intuition. -Qed. - -Definition sigst (x:AdivCs) := (sigma x). - -(* begin hide *) -Lemma sigst_strext : fun_strext sigst. -Proof. - red in |-*; intros x y; unfold sigst; simpl in |-*. - unfold ap_quotmod; simpl in |-*; unfold cspred. - intro X. - astepl (sigma (x[+]([--]y))); simpl in |-*. - astepl ((sigma x)[+](sigma ([--]y))); simpl in |-*. - astepl ((sigma x)[+][--](sigma y)). - astepl ((sigma x)[-](sigma y)). - apply minus_ap_zero; assumption. -Qed. -(* end hide *) - -Definition sigst_is_fun := Build_CSetoid_fun AdivCs B sigst sigst_strext. - -Lemma sigst_inj : injective sigst_is_fun. -Proof. - red in |-*; intros x y. - simpl in |-*. - unfold ap_quotmod. - simpl in |-*. - unfold cspred. - intro X. - unfold sigst. - apply (cg_ap_cancel_rht B (sigma x) (sigma y) [--](sigma y)). - astepr (Zero:B). - astepl ((sigma x)[+](sigma [--]y)); simpl. - astepl (sigma (x[+][--]y)); simpl. - assumption. - apply mh_pres_plus. - apply plus_resp_eq; apply mh_pres_minus. -Qed. - -(** -And now we have reached a goal: we can easily formulate and prove -the homomorphism theorem for modules. -*) - -Lemma ModHomTheorem : {tau : CSetoid_fun A AdivCs | surjective tau} - and {sigst : CSetoid_fun AdivCs B | injective sigst}. -Proof. - split. - exists tau_is_fun; apply tau_surj. - exists sigst_is_fun; apply sigst_inj. -Qed. - -End Theorem_on_Modules. - -(** -** The homomorphism theorem for rings -Let [R] and [S] be rings and [sigma] a ring homomorphism from [R] to [S]. -*** [CsR] is a coideal -We define [CsR], a coideal and prove that it really is a coideal. -*) - -Section Theorem_on_Rings. - -Section Cs_CoIdeal. - -Variables R S : CRing. -Variable sigma : RingHom R S. - -Definition cspredR (x:R) : CProp := (sigma x) [#] Zero. - -Definition cswdpredR : (wd_pred R). -Proof. - apply (Build_wd_pred R cspredR). - unfold pred_wd; intros x y. - unfold cspredR; auto. - intros H0 H1. - assert ((rhmap R S sigma) x [=] (rhmap R S sigma) y). - apply (csf_wd R S (rhmap R S sigma) x y H1). - astepl ((rhmap R S sigma) x). - assumption. -Defined. - -Lemma cs_is_coideal : is_coideal cswdpredR. -Proof. - unfold cswdpredR. - apply Build_is_coideal; simpl in |-*; unfold cspredR. - (* C_apzero *) - apply rh_apzero. - (* C_plus *) - intros x y X. - cut ((sigma x)[+](sigma y)[#]Zero). - intro X0. - apply cg_add_ap_zero; auto. - astepl (sigma (x[+]y)); algebra. - (* C_mult *) - intros x y X. - cut ((sigma x)[*](sigma y)[#]Zero). - intro X0; split; algebra. - apply (cring_mult_ap_zero S (sigma x) (sigma y)); auto. - apply (cring_mult_ap_zero_op S (sigma x) (sigma y)); auto. - astepl (sigma (x[*]y)); assumption. - (* C_non_triv *) - astepl (One:S); algebra. -Qed. - -Definition cs_as_coideal := Build_coideal R cswdpredR cs_is_coideal. - -End Cs_CoIdeal. - - -Variables R S : CRing. -Variable sigma : RingHom R S. - -(** -Now we can `divide' [R] by $\lnot$#~#[CsR]. -*) - -Definition CsR := cs_as_coideal R S sigma. -Definition RdivCsR := quotring_as_CRing R CsR. - -(** -We now define the functions of which we want to prove the existence. -*) - -Definition Rtau (x:R) := (x:RdivCsR). - -Lemma Rtau_strext : fun_strext Rtau. -Proof. - red in |-*; intros x y; unfold Rtau; simpl in |-*. - unfold ap_quotring; simpl in |-*; unfold cspred. - intro X; cut ((x[-]y)[#]Zero); algebra. - apply (rh_apzero R S sigma (x[-]y)); assumption. -Qed. - -Definition Rtau_is_fun := Build_CSetoid_fun R RdivCsR Rtau Rtau_strext. - -Lemma Rtau_surj : surjective Rtau_is_fun. -Proof. - red in |-*; intro b. - exists b. - simpl in |-*. - apply eq_quotring_wd. - unfold Rtau; intuition. -Qed. - -Definition Rsigst (x:RdivCsR) := (sigma x). - -Lemma Rsigst_strext : fun_strext Rsigst. -Proof. - red in |-*; intros x y; unfold Rsigst; simpl in |-*. - unfold ap_quotring; simpl in |-*; unfold cspredR. - intro X. - astepl (sigma (x[+]([--]y))); simpl in |-*. - astepl ((sigma x)[+](sigma ([--]y))); simpl in |-*. - astepl ((sigma x)[+][--](sigma y)). - astepl ((sigma x)[-](sigma y)). - apply minus_ap_zero; assumption. -Qed. - -Definition Rsigst_is_fun := Build_CSetoid_fun RdivCsR S Rsigst Rsigst_strext. - -Lemma Rsigst_inj : injective Rsigst_is_fun. -Proof. - red in |-*; intros x y. - simpl in |-*. - unfold ap_quotring. - simpl in |-*. - unfold cspred. - intro X. - unfold Rsigst. - apply (cg_ap_cancel_rht S (sigma x) (sigma y) [--](sigma y)). - astepr (Zero:S). - astepl ((sigma x)[+](sigma [--]y)); simpl. - astepl (sigma (x[+][--]y)); simpl. - assumption. - apply rh_pres_plus. - autorewrite with ringHomPush. - reflexivity. -Qed. - -(** -And now we have reached a goal: we can easily formulate and prove -the homomorphism theorem for rings. -*) - -Lemma RingHomTheorem : {Rtau : CSetoid_fun R RdivCsR | surjective Rtau} - and {Rsigst : CSetoid_fun RdivCsR S | injective Rsigst}. -Proof. - split. - exists Rtau_is_fun; apply Rtau_surj. - exists Rsigst_is_fun; apply Rsigst_inj. -Qed. - -End Theorem_on_Rings. diff --git a/old/CIdeals.v b/old/CIdeals.v deleted file mode 100644 index 29bfa14d..00000000 --- a/old/CIdeals.v +++ /dev/null @@ -1,159 +0,0 @@ -(* Copyright © 1998-2006 - * Henk Barendregt - * Luís Cruz-Filipe - * Herman Geuvers - * Mariusz Giero - * Rik van Ginneken - * Dimitri Hendriks - * Sébastien Hinderer - * Bart Kirkels - * Pierre Letouzey - * Iris Loeb - * Lionel Mamane - * Milad Niqui - * Russell O’Connor - * Randy Pollack - * Nickolay V. Shmyrev - * Bas Spitters - * Dan Synek - * Freek Wiedijk - * Jan Zwanenburg - * - * This work is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This work is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this work; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) -(* Ideals.v, v1.0, 28april2004, Bart Kirkels *) - -(** printing [+] %\ensuremath+% #+# *) -(** printing [*] %\ensuremath\times% #×# *) -(** printing ['] %\ensuremath.% #.# *) -(** printing [-] %\ensuremath{-}% #−# *) -(** printing [--] %\ensuremath-% #−# *) -(** printing [=] %\ensuremath=% #≡# *) -(** printing [#] %\ensuremath\#% *) -(** printing Zero %\ensuremath{\mathbf0}% #0# *) -(** printing One %\ensuremath{\mathbf1}% #1# *) - -Require Export CRings. - -(** -* Ideals and coideals -** Definition of ideals and coideals -Let [R] be a ring. At this moment all CRings are commutative and -non-trivial. So our ideals are automatically two-sided. As soon -as non-commutative rings are represented in CoRN left and -right ideals should be defined. -*) - -Section Ideals. - -Variable R : CRing. - -Record is_ideal (idP : wd_pred R) : CProp := - { idax : forall a x:R, idP a -> idP (a[*]x); - idprpl : forall x y : R, idP x -> idP y -> idP (x[+]y)}. - -Record ideal : Type := - { idpred :> wd_pred R; - idproof : is_ideal idpred}. - -(* begin hide *) -Variable I : ideal. -Definition ideal_as_CSetoid := Build_SubCSetoid R I. -(* end hide *) - -(** -We actually define strongly non-trivival co-ideals. -*) - -Record is_coideal (ciP : wd_pred R) : CProp := - { ciapzero : forall x:R, ciP x -> x[#]Zero; - ciplus : forall x y:R, ciP (x[+]y) -> ciP x or ciP y; - cimult : forall x y:R, ciP (x[*]y) -> ciP x and ciP y; - cinontriv : ciP One}. - -Record coideal : Type := - { cipred :> wd_pred R; - ciproof : is_coideal cipred}. - -(* begin hide *) -Variable C : coideal. -Definition coideal_as_CSetoid := Build_SubCSetoid R C. -(* end hide *) - -End Ideals. - -Implicit Arguments is_ideal [R]. -Implicit Arguments is_coideal [R]. - -(** -%\newpage% -** Axioms of ideals and coideals -Let [R] be a ring, [I] and ideal of [R] and [C] a coideal of [R]. -*) - -Section Ideal_Axioms. - -Variable R : CRing. -Variable I : ideal R. -Variable C : coideal R. - -Lemma ideal_is_ideal : is_ideal I. -Proof. - elim I; auto. -Qed. - -Lemma coideal_is_coideal : is_coideal C. -Proof. - elim C; auto. -Qed. - -Lemma coideal_apzero : forall x:R, C x -> x[#]Zero. -Proof. - elim C. intuition elim ciproof0. -Qed. - -Lemma coideal_nonzero : Not (C Zero). -Proof. - intro. - cut ((Zero:R)[#](Zero:R)); try apply coideal_apzero; try assumption. - apply ap_irreflexive. -Qed. - -Lemma coideal_plus : forall x y:R, C (x[+]y) -> C x or C y. -Proof. - elim C. intuition elim ciproof0. -Qed. - -Lemma coideal_mult : forall x y:R, C (x[*]y) -> C x and C y. -Proof. - elim C. intuition elim ciproof0. -Qed. - -Lemma coideal_nontriv : C One. -Proof. - elim C. intuition elim ciproof0. -Qed. - -Lemma coideal_wd : forall x y:R, x[=]y -> C x -> C y. -Proof. - elim C. simpl in |-*. intro. - elim cipred0. intros. - apply (wdp_well_def x y); auto. -Qed. - -End Ideal_Axioms. - -Hint Resolve coideal_apzero coideal_nonzero coideal_plus: algebra. -Hint Resolve coideal_mult coideal_wd coideal_nontriv: algebra. diff --git a/old/CModule_Homomorphisms.v b/old/CModule_Homomorphisms.v deleted file mode 100644 index 54affc9f..00000000 --- a/old/CModule_Homomorphisms.v +++ /dev/null @@ -1,176 +0,0 @@ -(* Copyright © 1998-2006 - * Henk Barendregt - * Luís Cruz-Filipe - * Herman Geuvers - * Mariusz Giero - * Rik van Ginneken - * Dimitri Hendriks - * Sébastien Hinderer - * Bart Kirkels - * Pierre Letouzey - * Iris Loeb - * Lionel Mamane - * Milad Niqui - * Russell O’Connor - * Randy Pollack - * Nickolay V. Shmyrev - * Bas Spitters - * Dan Synek - * Freek Wiedijk - * Jan Zwanenburg - * - * This work is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This work is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this work; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) -(* CModule_Homomorphisms.v, v1.0, 28april2004, Bart Kirkels *) - -(** printing [+] %\ensuremath+% #+# *) -(** printing [*] %\ensuremath\times% #×# *) -(** printing ['] %\ensuremath.% #.# *) -(** printing [-] %\ensuremath{-}% #−# *) -(** printing [--] %\ensuremath-% #−# *) -(** printing [=] %\ensuremath=% #≡# *) -(** printing [#] %\ensuremath\#% *) -(** printing Zero %\ensuremath{\mathbf0}% #0# *) -(** printing One %\ensuremath{\mathbf1}% #1# *) -(** printing phi %\ensuremath{\phi}% *) - -Require Export CModules. - -(** -* Module Homomorphisms -** Definition of Module Homomorphisms -Let [R] be a ring, let [A] and [B] be [R]-Modules and [phi : A -> B]. -*) - -Section ModHom_Definition. - -Variable R : CRing. -Variables A B : RModule R. - -Section ModHom_Preliminary. - -Variable phi : CSetoid_fun A B. - -Definition fun_pres_plus := forall x y:A, phi (x [+] y) [=] (phi x) [+] (phi y). -Definition fun_pres_unit := (phi (cm_unit A)) [=] (cm_unit B). -Definition fun_pres_mult := forall (a:R)(x:A), phi (rm_mu A a x) [=] rm_mu B a (phi x). - -End ModHom_Preliminary. - - -Record ModHom : Type := - {hommap :> CSetoid_fun A B; - hom1 : fun_pres_plus hommap; - hom2 : fun_pres_unit hommap; - hom3 : fun_pres_mult hommap}. - -End ModHom_Definition. - -Implicit Arguments ModHom [R]. -Implicit Arguments hommap [R]. -Implicit Arguments hom1 [R]. -Implicit Arguments hom2 [R]. -Implicit Arguments hom3 [R]. - -(** -** Lemmas on Module Homomorphisms -Let [R] be a ring, [A] and [B] [R]-Modules -and [f] a module homomorphism from [A] to [B]. -*** Axioms on Module Homomorphisms -*) - -Section ModHom_Lemmas. - -Variable R : CRing. -Variables A B : RModule R. - -Section ModHom_Axioms. - -Variable f : ModHom A B. - -Lemma mh_strext : forall x y:A, (f x) [#] (f y) -> x [#] y. -Proof. - elim f; intuition. - assert (fun_strext hommap0); elim hommap0; intuition. -Qed. - -Lemma mh_pres_plus : forall x y:A, f (x[+]y) [=] (f x) [+] (f y). -Proof. - elim f; auto. -Qed. - -Lemma mh_pres_unit : (f (cm_unit A)) [=] (cm_unit B). -Proof. - elim f; auto. -Qed. - -Lemma mh_pres_mult : forall (a:R)(x:A), f (rm_mu A a x) [=] rm_mu B a (f x). -Proof. - elim f; auto. -Qed. - -End ModHom_Axioms. - - -Hint Resolve mh_strext mh_pres_plus mh_pres_unit mh_pres_mult : algebra. - -(** -*** Facts on Module Homomorphisms -*) - -Section ModHom_Basics. - -Variable f : ModHom A B. - -Lemma mh_pres_zero : (f (Zero:A)) [=] (Zero:B). -Proof. - astepr ((f Zero)[-](f Zero)). - astepr ((f (Zero[+]Zero))[-](f Zero)). - Step_final ((f Zero[+]f Zero)[-]f Zero). -Qed. - -Lemma mh_pres_minus : forall x:A, (f [--]x) [=] [--] (f x). -Proof. - intro x; apply (cg_cancel_lft B (f x)). - astepr (Zero:B). - astepl (f (x[+][--]x)). - Step_final (f (Zero:A)); try apply mh_pres_zero. -Qed. - -Lemma mh_apzero : forall x:A, (f x) [#] Zero -> x [#] Zero. -Proof. - intros x X; apply (cg_ap_cancel_rht A x (Zero:A) x). - astepr x. - apply (mh_strext f (x[+]x) x). - astepl ((f x)[+](f x)). - astepr ((Zero:B) [+] (f x)). - apply (op_rht_resp_ap B (f x) (Zero:B) (f x)). - assumption. -Qed. - -End ModHom_Basics. - -End ModHom_Lemmas. - -Implicit Arguments mh_strext [R]. -Implicit Arguments mh_pres_plus [R]. -Implicit Arguments mh_pres_unit [R]. -Implicit Arguments mh_pres_mult [R]. -Implicit Arguments mh_pres_zero [R]. -Implicit Arguments mh_pres_minus [R]. -Implicit Arguments mh_apzero [R]. - -Hint Resolve mh_strext mh_pres_plus mh_pres_unit mh_pres_mult : algebra. -Hint Resolve mh_pres_zero mh_pres_minus mh_apzero : algebra. diff --git a/old/CModules.v b/old/CModules.v deleted file mode 100644 index 7836505c..00000000 --- a/old/CModules.v +++ /dev/null @@ -1,387 +0,0 @@ -(* Copyright © 1998-2006 - * Henk Barendregt - * Luís Cruz-Filipe - * Herman Geuvers - * Mariusz Giero - * Rik van Ginneken - * Dimitri Hendriks - * Sébastien Hinderer - * Bart Kirkels - * Pierre Letouzey - * Iris Loeb - * Lionel Mamane - * Milad Niqui - * Russell O’Connor - * Randy Pollack - * Nickolay V. Shmyrev - * Bas Spitters - * Dan Synek - * Freek Wiedijk - * Jan Zwanenburg - * - * This work is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This work is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this work; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) -(* CModules.v, v1.0, 28april2004, Bart Kirkels *) - -(** printing [+] %\ensuremath+% #+# *) -(** printing [*] %\ensuremath\times% #×# *) -(** printing ['] %\ensuremath.% #.# *) -(** printing [-] %\ensuremath{-}% #−# *) -(** printing [--] %\ensuremath-% #−# *) -(** printing [=] %\ensuremath=% #≡# *) -(** printing [#] %\ensuremath\#% *) -(** printing Zero %\ensuremath{\mathbf0}% #0# *) -(** printing One %\ensuremath{\mathbf1}% #1# *) - -Require Export CRings. - -(** -* Modules -** Definition of the notion of an R-Module -Let [R] be a ring. -*) - -Section Module_Definition. - -Variable R : CRing. - -Record is_RModule (A : CAbGroup) (mu : CSetoid_bin_fun R A A) : Prop := - {rm_pl1 : forall (a:R)(x y:A), (mu a (x[+]y))[=] - ((mu a x)[+](mu a y)); - rm_pl2 : forall (a b:R)(x:A), (mu (a[+]b) x)[=] - ((mu a x)[+](mu b x)); - rm_mult: forall (a b:R)(x:A), (mu (a[*]b) x)[=] - (mu a (mu b x)); - rm_one : forall x:A, (mu One x)[=]x}. - -Record RModule : Type := - {rm_crr :> CAbGroup; - rm_mu : CSetoid_bin_fun R rm_crr rm_crr; - rm_proof: is_RModule rm_crr rm_mu}. - -End Module_Definition. - -Implicit Arguments is_RModule [R]. -Implicit Arguments rm_crr [R]. -Implicit Arguments rm_mu [R]. -Implicit Arguments rm_pl1 [R]. -Implicit Arguments rm_pl2 [R]. -Implicit Arguments rm_mult[R]. -Implicit Arguments rm_one [R]. -Implicit Arguments rm_proof[R]. - -Notation "a ['] x" := (rm_mu _ a x) (at level 20, right associativity). - -(** -Let [R] be a ring, let [A] be an [R]-Module. -** Lemmas on Modules -*) - -Section Module. - -Variable R : CRing. - - -(** -*** Axioms on Modules -*) - -Section Module_Axioms. - -Variable A : RModule R. - -Lemma RModule_is_RModule : is_RModule (rm_crr A) (rm_mu A). -Proof. - elim A; intuition. -Qed. - -Lemma mu_plus1 : - forall (a : R) (x y : A), a['](x[+]y) [=] a[']x [+] a[']y. -Proof. - elim RModule_is_RModule; intuition. -Qed. - -Lemma mu_plus2 : - forall (a b : R) (x : A), (a[+]b) ['] x [=] a[']x [+] b[']x. -Proof. - elim RModule_is_RModule; intuition. -Qed. - -Lemma mu_mult : - forall (a b : R) (x : A), (a[*]b)['] x [=] a[']b[']x. -Proof. - elim RModule_is_RModule; intuition. -Qed. - -Lemma mu_one : forall x : A, One[']x [=] x. -Proof. - elim RModule_is_RModule; intuition. -Qed. - -End Module_Axioms. - -Hint Resolve mu_plus1 mu_plus2 mu_mult mu_one : algebra. - -(** -*** Facts on Modules -*) - -Section Module_Basics. - -Variable A : RModule R. - -(* begin hide *) - -Lemma mu0help : forall (a:R) (x:A), Zero[']x [=] a[']Zero[']x. -Proof. - intros a x; astepl ((a[*]Zero)[']x); algebra. -Qed. - -Hint Resolve mu0help : algebra. - -Lemma mu0help2 : forall x:A, Zero[']x [=] Zero[']x [+] Zero[']x. -Proof. - intro x; astepl ((One[+]One)[']Zero[']x); algebra. - astepl (One[']Zero[']x [+] One['](Zero[']x)). - algebra. -Qed. - -Hint Resolve mu0help2 : algebra. - -(* end hide *) - -Lemma mu_zerox : forall x : A, Zero[']x [=] Zero. -Proof. - intro x; apply eq_symmetric. - apply (cg_cancel_lft _ (Zero[']x)); algebra. - astepl (Zero[']x); algebra. -Qed. - -Hint Resolve mu_zerox : algebra. - -Lemma mu_minusonex : forall x:A, [--]One[']x [=] [--]x. -Proof. - intro x; apply (cg_cancel_rht A x ([--]One[']x) [--]x). - astepr (Zero:A). - astepl ([--]One[']x [+] One[']x). - astepl (([--]One[+]One)['] x). - astepl (Zero[']x); algebra. -Qed. - -Hint Resolve mu_minusonex : algebra. - -Lemma mu_azero : forall a:R, a['](Zero:A) [=] Zero. -Proof. - intro a; apply (cg_cancel_rht A (a['](Zero:A))). - astepr (a['](Zero:A)). - astepl (a[']((Zero:A)[+](Zero:A))). - Step_final (a['](Zero:A)). -Qed. - -Lemma mu_aminusx : forall (a:R)(x:A), a['][--]x [=] [--] (a[']x). -Proof. - intros a x; apply (cg_cancel_rht A (a[']x)). - astepr (Zero:A). - astepl (a[']([--]x[+]x)). - astepl (a['](Zero:A)). - apply mu_azero. -Qed. - -Lemma mu_minusax : forall (a:R)(x:A), [--]a[']x [=] [--] (a[']x). -Proof. - intros a x; apply (cg_cancel_rht A (a[']x)). - astepr (Zero:A). - astepl (([--]a[+]a)[']x). - astepl ((Zero:R)[']x). - apply mu_zerox. -Qed. - -Hint Resolve mu_azero mu_aminusx mu_minusax: algebra. - -(* begin hide *) - -Lemma mu_strext : forall (a1 a2:R)(x1 x2:A), a1[']x1[#]a2[']x2 -> - a1[#]a2 or x1[#]x2. -Proof. - elim (rm_mu A); intuition. -Qed. - -(* end hide *) - -Lemma mu_axap0_aap0 : forall (a:R)(x:A), a[']x [#] (Zero:A) -> a [#] (Zero:R). -Proof. - intros a x X; apply (cg_ap_cancel_rht R a (Zero:R) a). - astepr a. - cut (a[+]a[#]a or x[#]x); intuition. - assert False; try apply (ap_irreflexive_unfolded A x); try assumption. - elim H. - apply mu_strext. - astepl ((a[']x)[+](a[']x)). - astepr ((Zero:A)[+](a[']x)). - apply op_rht_resp_ap; assumption. -Qed. - -Lemma mu_axap0_xap0 : forall (a:R)(x:A), a[']x [#] (Zero:A) -> x [#] (Zero:A). -Proof. - intros a x X; apply (cg_ap_cancel_rht A x (Zero:A) x). - astepr x. - cut (a[#]a or x[+]x[#]x); intuition. - assert False; try apply (ap_irreflexive_unfolded R a); try assumption. - elim H. - apply mu_strext. - astepl ((a[']x)[+](a[']x)). - astepr ((Zero:A)[+](a[']x)). - apply op_rht_resp_ap; assumption. -Qed. - -Hint Resolve mu_strext mu_axap0_aap0 mu_axap0_xap0 : algebra. - -End Module_Basics. - -(** -** Rings are Modules -*) - -Section Rings. - -Lemma R_is_RModule : is_RModule R cr_mult. -Proof. - apply Build_is_RModule; intuition. -Qed. - -Definition R_as_RModule := Build_RModule R R cr_mult R_is_RModule. - -End Rings. - -(** -% \newpage % -** Definition of sub- and comodules -*) - -Section CoSubModules. - -Variable A : RModule R. - -Record is_submod (subP : wd_pred A) : CProp := - {smzero : subP Zero; - smplus : forall x y:A, subP x and subP y -> subP (x[+]y); - smmult : forall (x:A)(a:R), subP x -> subP(a[']x)}. - -Record submod : Type := - {smpred :> wd_pred A; - smproof: is_submod smpred}. - -(* begin hide *) -Variable sm : submod. -Definition submod_as_CSetoid := Build_SubCSetoid A sm. -(* end hide *) - -Record is_comod (coP : wd_pred A) : CProp := - {cmapzero : forall x:A, coP x -> x[#]Zero; - cmplus : forall x y:A, coP (x[+]y) -> coP x or coP y; - cmmult : forall (x:A)(a:R), coP (a[']x) -> coP x}. - -Record comod : Type := - {cmpred :> wd_pred A; - cmproof: is_comod cmpred}. - -(* begin hide *) -Variable cm : comod. -Definition comod_as_CSetoid := Build_SubCSetoid A cm. -(* end hide *) - -End CoSubModules. - -Implicit Arguments is_submod [A]. -Implicit Arguments is_comod [A]. - - -(** -** Axioms on sub- and comodules -Let [sm] be a submodule, let [cm] be a comodule. -*) - -Section CoSubModule_Axioms. - -Variable A : RModule R. -Variable sm : submod A. -Variable cm : comod A. - -Lemma submod_is_submod : is_submod sm. -Proof. - elim sm; auto. -Qed. - -Lemma comod_is_comod : is_comod cm. -Proof. - elim cm; auto. -Qed. - -Lemma comod_apzero : forall x:A, cm x -> x[#]Zero. -Proof. - elim cm. intuition elim cmproof0. -Qed. - -Lemma comod_nonzero : Not (cm Zero). -Proof. - intro. - cut ((Zero:A)[#](Zero:A)); try apply comod_apzero; try assumption. - apply ap_irreflexive. -Qed. - -Lemma comod_plus : forall x y:A, cm (x[+]y) -> cm x or cm y. -Proof. - elim cm. intuition elim cmproof0. -Qed. - -Lemma comod_mult : forall (x:A)(a:R), cm (a[']x) -> cm x. -Proof. - elim cm. intuition elim cmproof0. -Qed. - -Lemma comod_wd : forall x y:A, x[=]y -> cm x -> cm y. -Proof. - elim cm. - simpl in |-*. - intro. - elim cmpred0. - intros. - apply (wdp_well_def x y); auto. -Qed. - -End CoSubModule_Axioms. - - - -End Module. - -Implicit Arguments comod_plus [R]. -Implicit Arguments comod_mult [R]. -Implicit Arguments comod_wd [R]. -Implicit Arguments comod_apzero [R]. -Implicit Arguments comod_nonzero [R]. -Implicit Arguments is_submod [R]. -Implicit Arguments submod [R]. -Implicit Arguments is_comod [R]. -Implicit Arguments comod [R]. -Implicit Arguments cmpred [R]. -Implicit Arguments cmproof [R]. - -Hint Resolve mu_plus1 mu_plus2 mu_mult mu_one : algebra. -Hint Resolve mu0help mu0help2 mu_zerox mu_minusonex: algebra. -Hint Resolve mu_azero mu_aminusx mu_minusax: algebra. -Hint Resolve mu_strext mu_axap0_aap0 mu_axap0_xap0 : algebra. -Hint Resolve comod_apzero comod_nonzero : algebra. -Hint Resolve comod_plus comod_mult comod_wd : algebra. diff --git a/old/CMonoidCyc.v b/old/CMonoidCyc.v deleted file mode 100644 index 41f86598..00000000 --- a/old/CMonoidCyc.v +++ /dev/null @@ -1,4219 +0,0 @@ -(* Copyright © 1998-2006 - * Henk Barendregt - * Luís Cruz-Filipe - * Herman Geuvers - * Mariusz Giero - * Rik van Ginneken - * Dimitri Hendriks - * Sébastien Hinderer - * Bart Kirkels - * Pierre Letouzey - * Iris Loeb - * Lionel Mamane - * Milad Niqui - * Russell O’Connor - * Randy Pollack - * Nickolay V. Shmyrev - * Bas Spitters - * Dan Synek - * Freek Wiedijk - * Jan Zwanenburg - * - * This work is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This work is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this work; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -Require Export CMonoids. -Require Export csetoid_rewrite. -Require Export Zfinsetoid. -Require Export Nmonoid. -Require Export ZBasics. - -(** -* Cyclic CMonoids -Some specific lemmas about cyclic monoids. -*) - -Definition C_as_CSetoid (k n :Z)(H:(n>0)%Z)(H0:(k>= 0)%Z):CSetoid - := ZCSetoid_of_less (k+n). - - -Definition C_plus (k n:Z) (H:(n>0)%Z)(H0:(k>=0)%Z): -C_as_CSetoid k n H H0-> C_as_CSetoid k n H H0-> C_as_CSetoid k n H H0. -intros k n H H0. -simpl. -intros j i. -elim j. -intros j_ jprf jprf1. -elim i. -intros i_ iprf iprf1. -elim (Z_lt_le_dec (j_+i_) (k+n)). -intro H1. -apply Build_ZF with (j_+i_)%Z. -exact H1. -intuition. - -intro H1. -apply Build_ZF with ( k + (Zmod (j_+i_-k) n))%Z. -apply Zcompat_lt_plus. -set (H2:=(Z_mod_lt (j_+i_-k) n H)). -elim H2. -intros H3 H4. -exact H4. - -set (H2:=(Z_mod_lt (j_+i_-k) n H)). -elim H2. -intros H3 H4. -intuition. -Defined. - -Lemma C_plus_strext: -forall (k n:Z)(H:(n>0)%Z)(H0:(k>=0)%Z),(bin_fun_strext (C_as_CSetoid k n H H0) -(C_as_CSetoid k n H H0) (C_as_CSetoid k n H H0) (C_plus k n H H0)). -intros k n H H0. -unfold bin_fun_strext. -intros x1 x2 y1 y2. -elim x1. -intros x1_ x1prf x1prf1. -elim x2. -intros x2_ x2prf x2prf2. -elim y1. -intros y1_ y1prf y1prf1. -elim y2. -intros y2_ y2prf y2prf2. -simpl. -unfold ZFap. -unfold C_plus. -unfold sumbool_rec. -unfold sumbool_rect. -case (Z_lt_le_dec (x1_+y1_)(k+n)). -case (Z_lt_le_dec (x2_+y2_)(k+n)). -intros H6 H1 H2. -red in H2. -elim (Z_eq_dec x2_ x1_). -intro H3. -right. -intro H4. -apply H2. -rewrite H3. -rewrite H4. -reflexivity. - -intro H3. -left. -exact H3. - -intros H6 H1 H2. -red in H2. -elim (Z_eq_dec x2_ x1_). -intro H4. -right. -intro H5. -rewrite<- H4 in H1. -rewrite H5 in H6. -intuition. - -intro H4. -left. -exact H4. - -case (Z_lt_le_dec (x2_ + y2_)(k+n)). -intros H6 H1 H2. -red in H2. -elim (Z_eq_dec x2_ x1_). -intro H4. -right. -intro H5. -rewrite<- H4 in H1. -rewrite H5 in H6. -intuition. - -intro H4. -left. -exact H4. - -intros H6 H1 H2. -red in H2. -elim (Z_eq_dec x2_ x1_). -intro H3. -right. -red in |- *. -intros H4. -apply H2. -rewrite H3. -rewrite H4. -reflexivity. - -intros H3. -left. -exact H3. -Qed. - - -Definition C_plus_as_bin_fun (k n:Z)(H:(n>0)%Z)(H0:(k>=0)%Z):= -(Build_CSetoid_bin_fun (C_as_CSetoid k n H H0) (C_as_CSetoid k n H H0) -(C_as_CSetoid k n H H0) (C_plus k n H H0) (C_plus_strext k n H H0)). - -Lemma C_plus_is_CSemiGroup:forall (k n:Z)(H:(n>0)%Z)(H0:(k>=0)%Z), -(is_CSemiGroup (C_as_CSetoid k n H H0)(C_plus_as_bin_fun k n H H0)). -intros k n H H0. -unfold is_CSemiGroup. -unfold associative. -simpl. -intros x y z. -case x. -intros x_ xprf xprf1. -case y. -intros y_ yprf yprf1. -case z. -intros z_ zprf zprf1. -unfold ZFeq. -simpl. -unfold ZF_rec. -unfold ZF_rect. -unfold sumbool_rec. -unfold sumbool_rect. -case (Z_lt_le_dec (y_ + z_)(k+n)). -case (Z_lt_le_dec (x_ + (y_ + z_))). -case ( Z_lt_le_dec (x_ + y_)(k+n)). -simpl. -unfold sumbool_rec. -unfold sumbool_rect. -case (Z_lt_le_dec (x_+y_+z_)(k+n)). -intuition. - -intros H1 H2 H3 H4. -intuition. - -unfold C_plus. -unfold ZF_rec. -unfold ZF_rect. -unfold sumbool_rec. -unfold sumbool_rect. -case (Z_lt_le_dec (k + (x_ + y_ - k) mod n + z_) (k + n)). -intros H1 H2 H3 H4. -cut (Zmod (x_+y_ -k) n 0)%Z)(H0:(k>=0)%Z):= - (Build_CSemiGroup (C_as_CSetoid k n H H0)(C_plus_as_bin_fun k n H H0) -(C_plus_is_CSemiGroup k n H H0)). - -Definition C0 (k n:Z)(H:(n>0)%Z)(H0:(k>=0)%Z):(C_as_CSetoid k n H H0). -intros k n H H0. -simpl. -apply Build_ZF with 0%Z. -intuition. -intuition. -Defined. - -Lemma O_is_rht_unit_C: forall (k n:Z)(H:(n>0)%Z)(H0:(k>=0)%Z), -(is_rht_unit (C_plus_as_bin_fun k n H H0) (C0 k n H H0)). -intros k n H H0. -unfold is_rht_unit. -simpl. -unfold C0. -unfold C_plus. -unfold ZF_rec. -unfold ZF_rect. -unfold sumbool_rec. -unfold sumbool_rect. -intro x. -case x. -intros y prf prf1. -unfold ZFeq. -case (Z_lt_le_dec (y + 0)(k+n)). -intuition. - -intro H1. -intuition. -Qed. - -Lemma O_is_lft_unit_C: forall (k n:Z)(H:(n>0)%Z)(H0:(k>=0)%Z), -(is_lft_unit (C_plus_as_bin_fun k n H H0) (C0 k n H H0)). -intros k n H H0. -unfold is_lft_unit. -simpl. -unfold ZF_rec. -unfold ZF_rect. -unfold sumbool_rec. -unfold sumbool_rect. -intro x. -case x. -intros y prf prf1. -unfold ZFeq. -case (Z_lt_le_dec y (k + n)). -reflexivity. - -intuition. -Qed. - -Definition C_is_CMonoid (k n:Z)(H:(n>0)%Z)(H0:(k>=0)%Z):= -(Build_is_CMonoid (C_as_CSemiGroup k n H H0)(C0 k n H H0) -(O_is_rht_unit_C k n H H0)(O_is_lft_unit_C k n H H0)). - -Definition C_as_CMonoid ( k n:Z)(H:(n>0)%Z)(H0:(k>=0)%Z):= -(Build_CMonoid (C_as_CSemiGroup k n H H0)(C0 k n H H0)(C_is_CMonoid k n H H0)). - -Definition c (k n:Z)(H:(n>0)%Z)(H0:(k>=0)%Z)(H1:(10)%Z)(H0:(k>=0)%Z)(H1:((Z_of_nat m)0)%Z)(H0:((Z_of_nat (S m))=0)%Z)(H3:(10)%Z)(H0:(1=0)%Z), - @power_CMonoid (C_as_CMonoid k n H H1)(c k n H H1 H0)(S m)[=] - (@power_CMonoid (C_as_CMonoid k n H H1)(c k n H H1 H0) m)[+](c k n H H1 H0). -intros k n m. -Opaque Zplus. -simpl. -unfold ZFeq. -unfold ZF_rec. -unfold ZF_rect. -unfold sumbool_rec. -unfold sumbool_rect. -intros H H0 H1. -case (@power_CMonoid (C_as_CMonoid k n H H1) (c k n H H1 H0) m). -intros a prf prf1. -case ( Z_lt_le_dec (1 + a) (k + n)). -simpl. -unfold sumbool_rec. -unfold sumbool_rect. -case (Z_lt_le_dec (a + 1) (k + n)). -intuition. -intros H2 H3. -cut (0<= (a+1-k)%Z0)%Z)(H0:(1=0)%Z), - @power_CMonoid (C_as_CMonoid k n H H2)(c k n H H2 H0) m [=] - (cm k n m H H2 H1). -intros m k n. -induction m. -simpl. -reflexivity. - -intros H H0 H1 H6. -set (H2:=(power_C_plus k n m H H0 H6)). -cut (m0)%Z)(H0:(k>=0)%Z), - cyclic (C_as_CMonoid k n H H0)):CProp. -intros k n H H0. -unfold cyclic. -case (Z_le_gt_dec (k+n) 1). -intro H1. -exists (C0 k n H H0). -intro m. -case m. -simpl. -unfold ZFeq. -intros m' Hprf Hprf1. -exists 1. -case (@power_CMonoid (C_as_CMonoid k n H H0) (C0 k n H H0) 1). -intros m'' H2 H5. -intuition. - -intro H1. -cut (1< k+n)%Z. -2:auto with zarith. -intro H2. -exists (c k n H H0 H2). -intro m. -case m. -intros m'. -case m'. -intros prf prf1. -exists 0. -simpl. -reflexivity. - -intros p prf prf1. -exists (nat_of_P p). -set (H4:= (power_c (nat_of_P p) k n H H2)). -cut ((Z_of_nat (nat_of_P p) < k + n)%Z). -intro H5. -set (H6:= (H4 H5 H0)). -unfold cm in H6. -set (H7:=(inject_nat_convert p)). -generalize prf prf1. -rewrite<- H7. -intuition. - -set (H7:=(inject_nat_convert p)). -generalize prf prf1. -rewrite<- H7. -intuition. - -intros p prf prf0. -cut False. -intuition. -intuition. -Qed. - -Definition to_C: - forall (M:CMonoid)(u:M)(k l:nat)(H2:((Z_of_nat (l-k))>0)%Z) - (H3:((Z_of_nat k)>=0)%Z),(is_generator M u)-> - (kl0 and (k0 - (power_CMonoid u k0 [#] power_CMonoid u l0))))-> - M -> (C_as_CMonoid (Z_of_nat k)(Z_of_nat (l-k)) H2 H3). -intros M u k l H2 H3 H H1 m1. -simpl. -generalize H1. -clear H1. -unfold is_generator in H. -elim (H m1). -simpl. -clear H. -intros n H H1. -(* Here: suppose n0))%Z. -intro H6. -set (H5:= (Z_mod_lt (Z_of_nat (n-k))(Z_of_nat (l-k))H6)). -intuition. - -intuition. - -cut ((Z_of_nat k)>=0)%Z. -2:intuition. -cut ((Z_of_nat (l-k)>0))%Z. -intro H6. -set (H5:= (Z_mod_lt (Z_of_nat (n-k))(Z_of_nat (l-k))H6)). -intuition. - -elim H1. -clear H1. -intros H1 H5. -set (H6:=inj_minus1 l k (lt_le_weak k l H1)). -intuition. - -intro H4. -apply Build_ZF with (Z_of_nat n)%Z. -set (H5:=(inj_plus k (l-k))). -rewrite<- H5. -apply inj_lt. -intuition. -intuition. -Defined. - -Lemma to_C_strext: - forall (M:CMonoid)(u:M)(k l:nat)(H2:((Z_of_nat (l-k))>0)%Z) - (H3:((Z_of_nat k)>=0)%Z)(H:(is_generator M u))(H1:(kl0 and (k0 - (power_CMonoid u k0 [#] power_CMonoid u l0))))), - (fun_strext (to_C M u k l H2 H3 H H1)):CProp. -intros M u k l H2 H3 H H1. -unfold fun_strext. -simpl. -intros x y. -unfold ZFap. -unfold to_C. -unfold sigT_rec. -unfold sigT_rect. -set (H99:= (power_k_n M u)). -unfold is_generator in H. -case (H x). -intros n0 prfn0. -case (H y). -intros n1 prfn1. -case (le_lt_dec l n0). -case ( le_lt_dec l n1). -elim H1. -clear H1. -intros H1' H1. -intros grl1 grl0 H4. -cut (x[=](power_CMonoid u (k+(mod_nat (n0-k)(l-k) H2)))). -intro H5. -csetoid_rewrite H5. -cut (y[=](power_CMonoid u (k+(mod_nat (n1-k)(l-k) H2)))). -intro H6. -csetoid_rewrite H6. -elim H1. -clear H1. -intros H1 H1''. -set (p:=(k + mod_nat (n0 - k) (l - k) H2)). -set (q:=(k + mod_nat (n1 - k) (l - k) H2)). -cut (p<>q). -intro H7. -cut ((pp+(l-q) and (k 0)%Z. -2:intuition. -intro H17. -set (H16:=(Z_mod_lt (n1-k) (l-k) H17)). -unfold q. -set (H18:= (mod_nat_correct (n1-k) (l-k) H2)). - -3:intuition. -apply surj_eq. -rewrite (inj_plus (k + mod_nat (n1 - k) (l - k) H2) (l - (k + mod_nat (n1 - k) (l - k) H2))). -cut ((k + mod_nat (n1 - k) (l - k) H2)<=l). -intro H19. -rewrite (inj_minus1 l (k + mod_nat (n1 - k) (l - k) H2) H19). -intuition. - -apply surj_le. -rewrite (inj_plus k ( mod_nat (n1 - k) (l - k) H2)). -rewrite<- H18. -elim H16. -clear H16. -intros H16 H16'. -cut (k<= n1). -2:intuition. -intro H19. -rewrite (inj_minus1 n1 k H19). -cut (k<=l). -2:intuition. -intro H20. -rewrite (inj_minus1 l k H20). -intuition. - -split. -2:intuition. -2:apply lt_lt_minus. -3:intuition. -4:apply not_or. -4:exact H7. -set (H10:=(Z_mod_lt (n0-k)%nat (l-k)%nat H2)). -elim H10. -clear H10. -intros H10 H10'. -clear H10'. -set (H11:=(Z_mod_lt (n1-k)%nat (l-k)%nat H2)). -elim H11. -clear H11. -intros H11' H11. -clear H11'. -unfold q. -set (H12:= (mod_nat_correct (n1-k)(l-k) H2)). -apply surj_not. -rewrite (inj_plus p (l-(k+ mod_nat (n1 - k) (l - k) H2))). -rewrite (inj_minus1 l (k+mod_nat (n1-k)(l-k)H2)). -rewrite (inj_plus k (mod_nat (n1-k)(l-k) H2)). -rewrite<- H12. -unfold p. -rewrite (inj_plus k (mod_nat (n0-k)(l-k)H2)). -set (H13:=(mod_nat_correct (n0-k)(l-k) H2)). -rewrite<- H13. -cut (Z_of_nat k < - (Z_of_nat k + Z_of_nat (n0 - k) mod Z_of_nat (l - k) + - (Z_of_nat l - (Z_of_nat k + Z_of_nat (n1 - k) mod Z_of_nat (l - k))))%Z)%Z. -intuition. -clear H12. -clear H13. -cut (Z_of_nat k < - Z_of_nat k + 0 + - (Z_of_nat l - (Z_of_nat k + Z_of_nat (n1 - k) mod Z_of_nat (l - k))))%Z. -intuition. -cut (Z_of_nat k <= - Z_of_nat k + 0 + - (Z_of_nat l - (Z_of_nat k + Z_of_nat (l - k))))%Z. -intuition. -rewrite (inj_minus1 l k). -intuition. -apply lt_le_weak. -exact H1'. -apply surj_le. -rewrite (inj_plus k (mod_nat (n1-k)(l-k)H2)). -cut (Z_of_nat k + Z_of_nat ((l - k)) <= Z_of_nat l)%Z. -intuition. -rewrite (inj_minus1 l k). -intuition. -apply lt_le_weak. -exact H1'. -cut ((l-k)>0)%Z. -intro H11. -unfold q. -set (H9:= (mod_nat_correct (n1-k)(l-k) H2)). -apply surj_lt. -rewrite (inj_plus k ( mod_nat (n1 - k) (l - k) H2)). -rewrite<- H9. -set (H10:=(Z_mod_lt (n1-k) (l-k) H11)). -2:intuition. -cut (k<= n1). -intro H12. -2:intuition. -rewrite (inj_minus1 n1 k H12). -cut (k<= l). -intro H13. -2:intuition. -rewrite (inj_minus1 l k H13). -intuition. - -clear H8. -intro H8. -cut (q+(l-p)q+(l-p) and(k 0)%Z. -2:intuition. -intro H17. -set (H16:=(Z_mod_lt (n0-k) (l-k) H17)). -unfold p. -set (H18:= (mod_nat_correct (n0-k) (l-k) H2)). - -apply surj_eq. -rewrite (inj_plus (k + mod_nat (n0 - k) (l - k) H2) (l - (k + mod_nat (n0 - k) (l - k) H2))). -cut ((k + mod_nat (n0 - k) (l - k) H2)<=l). -intro H19. -rewrite (inj_minus1 l (k + mod_nat (n0 - k) (l - k) H2) H19). -intuition. - -apply surj_le. -rewrite (inj_plus k ( mod_nat (n0 - k) (l - k) H2)). -rewrite<- H18. -elim H16. -clear H16. -intros H16 H16'. -cut (k<= n0). -2:intuition. -intro H19. -rewrite (inj_minus1 n0 k H19). -cut (k<=l). -2:intuition. -intro H20. -rewrite (inj_minus1 l k H20). -intuition. - -split. -set (H10:=(Z_mod_lt (n0-k)%nat (l-k)%nat H2)). -elim H10. -clear H10. -intros H10' H10. -clear H10'. -set (H11:=(Z_mod_lt (n1-k)%nat (l-k)%nat H2)). -elim H11. -clear H11. -intros H11 H11'. -clear H11'. -unfold p. -set (H12:= (mod_nat_correct (n0-k)(l-k) H2)). -apply surj_not. -rewrite (inj_plus q (l-(k+ mod_nat (n0 - k) (l - k) H2))). -rewrite (inj_minus1 l (k+mod_nat (n0-k)(l-k)H2)). -rewrite (inj_plus k (mod_nat (n0-k)(l-k) H2)). -rewrite<- H12. -unfold q. -rewrite (inj_plus k (mod_nat (n1-k)(l-k)H2)). -set (H13:=(mod_nat_correct (n1-k)(l-k) H2)). -rewrite<- H13. -cut (Z_of_nat k < - (Z_of_nat k + Z_of_nat (n1 - k) mod Z_of_nat (l - k) + - (Z_of_nat l - (Z_of_nat k + Z_of_nat (n0 - k) mod Z_of_nat (l - k))))%Z)%Z. -intuition. -clear H12. -clear H13. -cut (Z_of_nat k < - Z_of_nat k + 0 + - (Z_of_nat l - (Z_of_nat k + Z_of_nat (n0 - k) mod Z_of_nat (l - k))))%Z. -intuition. -cut (Z_of_nat k <= - Z_of_nat k + 0 + - (Z_of_nat l - (Z_of_nat k + Z_of_nat (l - k))))%Z. -intuition. -rewrite (inj_minus1 l k). -intuition. -apply lt_le_weak. -exact H1'. -apply surj_le. -rewrite (inj_plus k (mod_nat (n0-k)(l-k)H2)). -cut (Z_of_nat k + Z_of_nat ((l - k)) <= Z_of_nat l)%Z. -intuition. -rewrite (inj_minus1 l k). -intuition. -apply lt_le_weak. -exact H1'. - -intuition. -apply lt_lt_minus. -2:intuition. -unfold p. -set (H9:= (mod_nat_correct (n0-k)(l-k) H2)). -apply surj_lt. -rewrite (inj_plus k ( mod_nat (n0 - k) (l - k) H2)). -rewrite<- H9. -cut ((l-k)>0)%Z. -intro H11. -set (H10:=(Z_mod_lt (n0-k) (l-k) H11)). -2:intuition. -cut (k<= n0). -intro H12. -2:intuition. -rewrite (inj_minus1 n0 k H12). -cut (k<= l). -intro H13. -2:intuition. -rewrite (inj_minus1 l k H13). -intuition. - -apply surj_not. -unfold p. -unfold q. -rewrite (inj_plus k ( mod_nat (n0 - k) (l - k) H2)). -rewrite (inj_plus k ( mod_nat (n1 - k) (l - k) H2)). -rewrite<- (mod_nat_correct (n0-k)(l-k) H2). -rewrite<- (mod_nat_correct (n1-k)(l-k) H2). -intuition. - -csetoid_rewrite_rev prfn1. -apply H99. -unfold is_generator. -exact H. -intuition. -intuition. - -csetoid_rewrite_rev prfn0. -apply H99. -unfold is_generator. -exact H. -intuition. -intuition. - -intros H4 H5 H6. -elim H1. -clear H1. -intros H1' H1. -cut (x[=](power_CMonoid u (k+(mod_nat (n0-k)(l-k) H2)))). -intro H7. -csetoid_rewrite H7. -csetoid_rewrite_rev prfn1. -elim H1. -clear H1. -intros H1 H1''. -set (p:=n1). -set (q:=(k + mod_nat (n0 - k) (l - k) H2)). -cut ((pk or ((p+(l-q)=k))). -intro H13. -elim H13. -clear H13. -intro H13. -cut (k<>p+(l-q) and (k 0)%Z. -2:intuition. -intro H17. -set (H16:=(Z_mod_lt (n0-k) (l-k) H17)). -unfold q. -set (H18:= (mod_nat_correct (n0-k) (l-k) H2)). - -5:intuition. -apply surj_eq. -rewrite (inj_plus (k + mod_nat (n0 - k) (l - k) H2) (l - (k + mod_nat (n0 - k) (l - k) H2))). -cut ((k + mod_nat (n0 - k) (l - k) H2)<=l). -intro H19. -rewrite (inj_minus1 l (k + mod_nat (n0 - k) (l - k) H2) H19). -intuition. - -apply surj_le. -rewrite (inj_plus k ( mod_nat (n0 - k) (l - k) H2)). -rewrite<- H18. -elim H16. -clear H16. -intros H16 H16'. -cut (k<= n0). -2:intuition. -intro H19. -rewrite (inj_minus1 n0 k H19). -cut (k<=l). -2:intuition. -intro H20. -rewrite (inj_minus1 l k H20). -intuition. - -intuition. - -clear H13. -intro H13. -cut (p<>q and (p0)%Z. -intro H11. -set (H10:=(Z_mod_lt (n0-k) (l-k) H11)). -2:intuition. -cut (k<= n0). -intro H12. -2:intuition. -rewrite (inj_minus1 n0 k H12). -cut (k<= l). -intro H13. -2:intuition. -rewrite (inj_minus1 l k H13). -intuition. -exact H8. - -clear H8. -intro H8. -cut (q+(l-p)k or ((q+(l-p)=k))). -intro H13. -elim H13. -clear H13. -intro H13. -cut (k<>(q+(l-p)) and(kp and (qk or ((p+(l-q)=k))). -intro H13. -elim H13. -clear H13. -intro H13. -cut (k<>p+(l-q) and (k 0)%Z. -2:intuition. -intro H17. -set (H16:=(Z_mod_lt (n1-k) (l-k) H17)). -unfold q. -set (H18:= (mod_nat_correct (n1-k) (l-k) H2)). - -apply surj_eq. -rewrite (inj_plus (k + mod_nat (n1 - k) (l - k) H2) (l - (k + mod_nat (n1 - k) (l - k) H2))). -cut ((k + mod_nat (n1 - k) (l - k) H2)<=l). -intro H19. -rewrite (inj_minus1 l (k + mod_nat (n1 - k) (l - k) H2) H19). -intuition. - -apply surj_le. -rewrite (inj_plus k ( mod_nat (n1 - k) (l - k) H2)). -rewrite<- H18. -elim H16. -clear H16. -intros H16 H16'. -cut (k<= n1). -2:intuition. -intro H19. -rewrite (inj_minus1 n1 k H19). -cut (k<=l). -2:intuition. -intro H20. -rewrite (inj_minus1 l k H20). -intuition. - -intuition. - -clear H13. -intro H13. -cut (p<>q and (p0)%Z. -intro H11. -set (H10:=(Z_mod_lt (n1-k) (l-k) H11)). -2:intuition. -cut (k<= n1). -intro H12. -2:intuition. -rewrite (inj_minus1 n1 k H12). -cut (k<= l). -intro H13. -2:intuition. -rewrite (inj_minus1 l k H13). -intuition. -exact H8. - -clear H8. -intro H8. -cut (q+(l-p)k or ((q+(l-p)=k))). -intro H13. -elim H13. -clear H13. -intro H13. -cut (k<>q+(l-p) and (kp and (qk or ((p+(l-q)=k))). -intro H13. -elim H13. -clear H13. -intro H13. -cut (k<>(p+(l-q)) and (kq and (pk or ((q+(l-p)=k))). -intro H13. -elim H13. -clear H13. -intro H13. -cut (k<>q+(l-p) and (kp and (q0)%Z)(H3:((Z_of_nat k)>=0)%Z)(H:(is_generator M u)) -(H1:(kl0 and (k0 -(power_CMonoid u k0 [#] power_CMonoid u l0))))) -:= -(Build_CSetoid_fun M (C_as_CMonoid k (l - k)%nat H2 H3) -(to_C M u k l H2 H3 H H1) (to_C_strext M u k l H2 H3 H H1)). - -Lemma mod_nat_pi:forall (k l i:nat)(H:(k>0)%Z)(H0:(l>0)%Z), -k=l -> (mod_nat i k H)=(mod_nat i l H0). -intros k l i H H0 H1. -unfold mod_nat. -unfold COr_rec. -unfold COr_rect. -case (Zmod_pos i k H). -case (Zmod_pos i l H0). -reflexivity. - -simpl. -unfold sigT_rec. -unfold sigT_rect. -intros H2. -elim H2. -clear H2. -intros p H2. -intro H3. -rewrite H1 in H3. -rewrite H2 in H3. -apply surj_eq. -rewrite (convert_is_POS p). -intuition. - -unfold sigT_rec. -unfold sigT_rect. -intro H2. -elim H2. -clear H2. -intros p H2. -case (Zmod_pos i l H0). -intro H3. -rewrite H1 in H2. -rewrite H2 in H3. -apply surj_eq. -rewrite (convert_is_POS p). -exact H3. - -intro H3. -elim H3. -clear H3. -intros q H3. -rewrite<- H1 in H3. -rewrite H2 in H3. -apply surj_eq. -rewrite (convert_is_POS p). -rewrite (convert_is_POS q). -exact H3. -Qed. - -Section Char. -Variable M:CMonoid. -Variable k l:nat. -Variable H3: k>=0. -Variable H5: l-k>0. -Variable c0: cs_crr (csg_crr (cm_crr M)). -Variable power_mod:forall (k l n : nat) (H2 : (Z_of_nat (l - k) > 0)%Z), - k < n -> - k < l - and power_CMonoid c0 k[=]power_CMonoid c0 l - and (forall k0 l0 : nat, k0<>l0 and - (k0 < k or k0 = k and l0 < l) -> - power_CMonoid c0 k0[#]power_CMonoid c0 l0) -> - power_CMonoid c0 n[=] - power_CMonoid c0 (k + mod_nat (n - k) (l - k) H2). -Variable w_inj:forall k l a b : nat, - a < l -> - b < l -> - k < l - and power_CMonoid c0 k[=]power_CMonoid c0 l - and (forall k0 l0 : nat, k0<>l0 and - (k0 < k or k0 = k and l0 < l) -> - power_CMonoid c0 k0[#]power_CMonoid c0 l0) -> - power_CMonoid c0 a[=]power_CMonoid c0 b -> a = b. -Variable smallest: k < l - and power_CMonoid c0 k[=]power_CMonoid c0 l - and (forall k0 l0 : nat, k0<>l0 and - (k0 < k or k0 = k and l0 < l) -> - power_CMonoid c0 k0[#]power_CMonoid c0 l0). -Variable n0 n1 n2:nat. -Variable a b:cs_crr (csg_crr (cm_crr M)). -Variable Hn0:power_CMonoid c0 n0[=] - csbf_fun (csg_crr (cm_crr M)) (csg_crr (cm_crr M)) - (csg_crr (cm_crr M)) (csg_op (c:=cm_crr M)) a b. -Variable Hn1:power_CMonoid c0 n1[=]a. -Variable Hn2: power_CMonoid c0 n2[=]b. - - -Lemma Char1:(k + (n1 - k)%nat mod (l - k)%nat + (k + (n2 - k)%nat mod (l - k)%nat) < - k + (l - k)%nat)%Z->l<=n1 -> l<= n0 -> l<=n2 -> - (k + (n1 - k)%nat mod (l - k)%nat + (k + (n2 - k)%nat mod (l - k)%nat))%Z = - (k + (n0 - k)%nat mod (l - k)%nat)%Z. -intros z. -intros. -set (H11:= (power_plus M c0 n1 n2 )). -cut ( power_CMonoid c0 (n1 + n2)[=]power_CMonoid c0 n0). -2:csetoid_rewrite_cxt Hn1 H11. -2:csetoid_rewrite_cxt Hn2 H11. -2:csetoid_rewrite_cxt_rev Hn0 H11. -2: exact H11. -clear H11. -intro H11. -cut (Z_of_nat (l - k) > 0)%Z. -intro H13. -set (H12:=(mod_nat_correct (n1-k)(l-k) H13)). -rewrite H12. -set (H14:=(mod_nat_correct (n0-k)(l-k) H13)). -rewrite H14. -rewrite<- (inj_plus k (mod_nat (n1 - k) (l - k) H13)). -set (H15:=(mod_nat_correct (n2-k)(l-k) H13)). -rewrite H15. -rewrite<- (inj_plus k (mod_nat (n2 - k) (l - k) H13)). -rewrite<- (inj_plus (k + mod_nat (n1 - k) (l - k) H13) - (k + mod_nat (n2 - k) (l - k) H13)). -rewrite<- (inj_plus k (mod_nat (n0 - k) (l - k) H13)). -apply inj_eq. -apply w_inj with k l. -apply surj_lt. -rewrite (inj_plus (k + mod_nat (n1 - k) (l - k) H13) - (k + mod_nat (n2 - k) (l - k) H13)). -rewrite (inj_plus k ( mod_nat (n1 - k) (l - k) H13)). -rewrite (inj_plus k (mod_nat (n2 - k) (l - k) H13)). -rewrite<- H12. -rewrite<- H15. -replace (Z_of_nat l) with (Z_of_nat k + Z_of_nat (l - k))%Z. -exact z. -cut (k<=l). -intro H16. -rewrite (inj_minus1 l k H16). -intuition. -intuition. - -2:intuition. - -apply surj_lt. -rewrite (inj_plus k (mod_nat (n0 - k) (l - k) H13)). -rewrite<- H14. -set (H16:=(Z_mod_lt (Z_of_nat (n0-k)) (Z_of_nat(l-k))H13)). -elim H16. -clear H16. -intros H16 H17. -cut ( Z_of_nat (n0 - k) mod Z_of_nat (l - k) < Z_of_nat l%Z -(Z_of_nat k))%Z. -intuition. -cut (k<=l). -intro H18. -rewrite<- (inj_minus1 l k H18). -exact H17. -intuition. - -cut (k -l<=n1-> l<=n2 -> l<=n0-> -(Z_of_nat k + - (Z_of_nat k + Z_of_nat (n1 - k) mod Z_of_nat (l - k) + - (Z_of_nat k + Z_of_nat (n2 - k) mod Z_of_nat (l - k)) - - Z_of_nat k) mod Z_of_nat (l - k))%Z = - (Z_of_nat k + Z_of_nat (n0 - k) mod Z_of_nat (l - k))%Z. -intro z. -intros. -set (H11:= (power_plus M c0 n1 n2 )). -csetoid_rewrite_cxt Hn1 H11. -csetoid_rewrite_cxt Hn2 H11. -csetoid_rewrite_cxt_rev Hn0 H11. -simpl. -cut (Z_of_nat (l - k) > 0)%Z. -intro H13. -set (H12:=(mod_nat_correct (n1-k)(l-k) H13)). -rewrite H12. -set (H14:=(mod_nat_correct (n0-k)(l-k) H13)). -rewrite H14. -rewrite<- (inj_plus k (mod_nat (n1 - k) (l - k) H13)). -set (H15:=(mod_nat_correct (n2-k)(l-k) H13)). -rewrite H15. -rewrite<- (inj_plus k (mod_nat (n2 - k) (l - k) H13)). -rewrite<- (inj_plus (k + mod_nat (n1 - k) (l - k) H13) - (k + mod_nat (n2 - k) (l - k) H13)). -rewrite<- (inj_plus k (mod_nat (n0 - k) (l - k) H13)). -rewrite<- (inj_minus1 (k + mod_nat (n1 - k) (l - k) H13 + (k + mod_nat (n2 - k) (l - k) H13)) k). -rewrite (mod_nat_correct (k + mod_nat (n1 - k) (l - k) H13 + (k + mod_nat (n2 - k) (l - k) H13) - - k) (l-k) H13). -rewrite<- (inj_plus k (mod_nat - (k + mod_nat (n1 - k) (l - k) H13 + - (k + mod_nat (n2 - k) (l - k) H13) - k) (l - k) H13)). -2:intuition. -2:intuition. -apply inj_eq. -apply w_inj with k l. -apply surj_lt. -rewrite (inj_plus k (mod_nat - (k + mod_nat (n1 - k) (l - k) H13 + - (k + mod_nat (n2 - k) (l - k) H13) - k) (l - k) H13)). -rewrite<- (mod_nat_correct (k + mod_nat (n1 - k) (l - k) H13 + - (k + mod_nat (n2 - k) (l - k) H13) - k) (l - k) H13). -set (H16:=(Z_mod_lt (Z_of_nat ((k + mod_nat (n1 - k) (l - k) H13 + (k + mod_nat (n2 - k) (l - k) H13) - - k))) (Z_of_nat(l-k))H13)). -elim H16. -clear H16. -intros H16 H17. -cut ( Z_of_nat ((k + mod_nat (n1 - k) (l - k) H13 + (k + mod_nat (n2 - k) (l - k) H13) - - k)) mod Z_of_nat (l - k) < Z_of_nat l%Z -(Z_of_nat k))%Z. -intuition. -cut (k<=l). -intro H18. -rewrite<- (inj_minus1 l k H18). -exact H17. - -intuition. - -apply surj_lt. -rewrite (inj_plus k (mod_nat (n0-k) (l-k) H13)). -rewrite<- H14. -cut (Z_of_nat l - Z_of_nat k > 0)%Z. -intro H17. -set (H16:= (Z_mod_lt (n0-k) (l-k) H17)). -rewrite (inj_minus1 n0 k). -rewrite (inj_minus1 l k). -intuition. -intuition. -intuition. -intuition. -exact smallest. - -cut (k<(k + mod_nat (n1 - k) (l - k) H13 + - (k + mod_nat (n2 - k) (l - k) H13))). -intro H16. -csetoid_rewrite_rev (power_mod k l (k + mod_nat (n1 - k) (l - k) H13 + - (k + mod_nat (n2 - k) (l - k) H13)) H13 H16 smallest). - -cut (k - n2 < l -> - l <= n1 -> - l <= n0 -> - (Z_of_nat k + Z_of_nat (n1 - k) mod Z_of_nat (l - k) + Z_of_nat n2)%Z = - (Z_of_nat k + Z_of_nat (n0 - k) mod Z_of_nat (l - k))%Z. -intros. -set (H11:= (power_plus M c0 n1 n2 )). -csetoid_rewrite_cxt Hn1 H11. -csetoid_rewrite_cxt Hn2 H11. -csetoid_rewrite_cxt_rev Hn0 H11. -simpl. -cut (Z_of_nat (l - k) > 0)%Z. -intro H13. -set (H12:=(mod_nat_correct (n1-k)(l-k) H13)). -rewrite H12. -set (H14:=(mod_nat_correct (n0-k)(l-k) H13)). -rewrite H14. -rewrite<- (inj_plus k (mod_nat (n1 - k) (l - k) H13)). -rewrite<- (inj_plus k (mod_nat (n0 - k) (l - k) H13)). -rewrite<- (inj_plus (k + mod_nat (n1 - k) (l - k) H13) n2). -apply inj_eq. -apply w_inj with k l. -apply surj_lt. -rewrite (inj_plus (k + mod_nat (n1 - k) (l - k) H13) n2). -rewrite (inj_plus k ( mod_nat (n1 - k) (l - k) H13)). -rewrite<- H12. -set (H16:=(Z_mod_lt (Z_of_nat (n1-k)) (Z_of_nat(l-k))H13)). -elim H16. -clear H16. -intros H16 H17. -cut ( Z_of_nat (n1 - k) mod Z_of_nat (l - k) + Z_of_nat n2 < - Z_of_nat l - Z_of_nat k)%Z. -intuition. -cut (k<=l). -intro H18. -rewrite<- (inj_minus1 l k H18). -intuition. -intuition. - -apply surj_lt. -rewrite (inj_plus k ( mod_nat (n0 - k) (l - k) H13)). -rewrite<- H14. -cut (Z_of_nat l - Z_of_nat k > 0)%Z. -intro H16. -set (H15:=(Z_mod_lt (n0-k)(l-k) H16)). -cut (Z_of_nat (n0 - k) mod Z_of_nat (l - k) < Z_of_nat l- Z_of_nat k)%Z. -intuition. -cut (k<=l). -intro H18. -cut (k<=n0). -intro H19. -rewrite (inj_minus1 l k H18). -rewrite (inj_minus1 n0 k H19). -intuition. -intuition. -intuition. -intuition. - -exact smallest. - -cut (k - n2 < l -> - l <= n1 -> - l <= n0 -> - (Z_of_nat k + - (Z_of_nat k + Z_of_nat (n1 - k) mod Z_of_nat (l - k) + Z_of_nat n2 - - Z_of_nat k) mod Z_of_nat (l - k))%Z = - (Z_of_nat k + Z_of_nat (n0 - k) mod Z_of_nat (l - k))%Z. -intros. -set (H11:= (power_plus M c0 n1 n2 )). -csetoid_rewrite_cxt Hn1 H11. -csetoid_rewrite_cxt Hn2 H11. -csetoid_rewrite_cxt_rev Hn0 H11. -simpl. -cut (Z_of_nat (l - k) > 0)%Z. -intro H13. -set (H12:=(mod_nat_correct (n1-k)(l-k) H13)). -rewrite H12. -set (H14:=(mod_nat_correct (n0-k)(l-k) H13)). -rewrite H14. -rewrite<- (inj_plus k (mod_nat (n1 - k) (l - k) H13)). -rewrite<- (inj_plus (k + mod_nat (n1 - k) (l - k) H13) - n2). -rewrite<- (inj_plus k (mod_nat (n0 - k) (l - k) H13)). -rewrite<- (inj_minus1 (k + mod_nat (n1 - k) (l - k) H13 + n2) k). -rewrite (mod_nat_correct (k + mod_nat (n1 - k) (l - k) H13 + n2 - - k) (l-k) H13). -rewrite<- (inj_plus k (mod_nat (k + mod_nat (n1 - k) (l - k) H13 + n2 - k) (l - k) H13)). -2:intuition. -2:intuition. -apply inj_eq. -apply w_inj with k l. -apply surj_lt. -rewrite (inj_plus k (mod_nat - (k + mod_nat (n1 - k) (l - k) H13 + - n2 - k )(l - k) H13)). -rewrite<- (mod_nat_correct (k + mod_nat (n1 - k) (l - k) H13 + - n2 - k) (l - k) H13). -set (H16:=(Z_mod_lt (Z_of_nat ((k + mod_nat (n1 - k) (l - k) H13 + n2 - - k))) (Z_of_nat(l-k))H13)). -elim H16. -clear H16. -intros H16 H17. -cut ( Z_of_nat ((k + mod_nat (n1 - k) (l - k) H13 + n2 - - k)) mod Z_of_nat (l - k) < Z_of_nat l%Z -(Z_of_nat k))%Z. -intuition. -cut (k<=l). -intro H18. -rewrite<- (inj_minus1 l k H18). -exact H17. - -intuition. - -apply surj_lt. -rewrite (inj_plus k (mod_nat (n0-k) (l-k) H13)). -rewrite<- H14. -cut (Z_of_nat l - Z_of_nat k > 0)%Z. -intro H17. -set (H16:= (Z_mod_lt (n0-k) (l-k) H17)). -rewrite (inj_minus1 n0 k). -rewrite (inj_minus1 l k). -intuition. -intuition. -intuition. -intuition. -exact smallest. - -cut (k<(k + mod_nat (n1 - k) (l - k) H13 + - n2 )). -intro H16. -csetoid_rewrite_rev (power_mod k l (k + mod_nat (n1 - k) (l - k) H13 + - n2) H13 H16 smallest). - -cut (k - n2 < l -> - power_CMonoid c0 n2[=]b -> - n1 < l -> - l <= n0 -> - (Z_of_nat n1 + Z_of_nat n2)%Z = - (Z_of_nat k + Z_of_nat (n0 - k) mod Z_of_nat (l - k))%Z. -intro z. -intros. -set (H11:= (power_plus M c0 n1 n2 )). -csetoid_rewrite_cxt Hn1 H11. -csetoid_rewrite_cxt Hn2 H11. -csetoid_rewrite_cxt_rev Hn0 H11. -simpl. -cut (Z_of_nat (l - k) > 0)%Z. -intro H13. -set (H14:=(mod_nat_correct (n0-k)(l-k) H13)). -rewrite H14. -rewrite<- (inj_plus k (mod_nat (n0 - k) (l - k) H13)). -rewrite<- (inj_plus n1 n2). -apply inj_eq. -apply w_inj with k l. -apply surj_lt. -rewrite (inj_plus n1 n2). -rewrite (inj_minus1 l k ) in z. -intuition. -intuition. - -apply surj_lt. -rewrite (inj_plus k ( mod_nat (n0 - k) (l - k) H13)). -rewrite<- H14. -cut (Z_of_nat l - Z_of_nat k > 0)%Z. -intro H16. -set (H15:=(Z_mod_lt (n0-k)(l-k) H16)). -cut (Z_of_nat (n0 - k) mod Z_of_nat (l - k) < Z_of_nat l- Z_of_nat k)%Z. -intuition. -cut (k<=l). -intro H18. -cut (k<=n0). -intro H19. -rewrite (inj_minus1 l k H18). -rewrite (inj_minus1 n0 k H19). -intuition. -intuition. -intuition. -intuition. - -exact smallest. - -cut (k - n2 < l -> - power_CMonoid c0 n2[=]b -> - n1 < l -> - l <= n0 -> - (Z_of_nat k + (Z_of_nat n1 + Z_of_nat n2 - Z_of_nat k) mod Z_of_nat (l - k))%Z = - (Z_of_nat k + Z_of_nat (n0 - k) mod Z_of_nat (l - k))%Z. -intros. -set (H11:= (power_plus M c0 n1 n2 )). -csetoid_rewrite_cxt Hn1 H11. -csetoid_rewrite_cxt Hn2 H11. -csetoid_rewrite_cxt_rev Hn0 H11. -simpl. -cut (Z_of_nat (l - k) > 0)%Z. -intro H13. -set (H14:=(mod_nat_correct (n0-k)(l-k) H13)). -rewrite H14. -rewrite<- (inj_plus n1 - n2). -rewrite<- (inj_plus k (mod_nat (n0 - k) (l - k) H13)). -rewrite<- (inj_minus1 (n1+ n2) k). -rewrite (mod_nat_correct ( n1 + n2-k) (l-k) H13). -rewrite<- (inj_plus k (mod_nat (n1 + n2 - k) (l - k) H13)). -2:intuition. -apply inj_eq. -apply w_inj with k l. -apply surj_lt. -rewrite (inj_plus k (mod_nat - ( n1+ - n2 - k )(l - k) H13)). -rewrite<- (mod_nat_correct (n1 + - n2 - k) (l - k) H13). -set (H16:=(Z_mod_lt (Z_of_nat (n1 + n2 - - k))) (Z_of_nat(l-k))H13). -elim H16. -clear H16. -intros H16 H17. -cut ( Z_of_nat (n1 + n2 - - k) mod Z_of_nat (l - k) < Z_of_nat l%Z -(Z_of_nat k))%Z. -intuition. -cut (k<=l). -intro H18. -rewrite<- (inj_minus1 l k H18). -exact H17. - -intuition. - -apply surj_lt. -rewrite (inj_plus k (mod_nat (n0-k) (l-k) H13)). -rewrite<- H14. -cut (Z_of_nat l - Z_of_nat k > 0)%Z. -intro H17. -set (H16:= (Z_mod_lt (n0-k) (l-k) H17)). -rewrite (inj_minus1 n0 k). -rewrite (inj_minus1 l k). -intuition. -intuition. -intuition. -intuition. -exact smallest. - -cut (k<( n1 + - n2 )). -intro H15. -csetoid_rewrite_rev (power_mod k l (n1+n2) H13 H15 smallest). -cut (k - l <= n2 -> - power_CMonoid c0 n2[=]b -> - l <= n1 -> - power_CMonoid c0 n1[=]a -> - n0 < l -> - (Z_of_nat k + Z_of_nat (n1 - k) mod Z_of_nat (l - k) + - (Z_of_nat k + Z_of_nat (n2 - k) mod Z_of_nat (l - k)))%Z = - Z_of_nat n0. -intros z. -intros. -set (H11:= (power_plus M c0 n1 n2 )). -csetoid_rewrite_cxt Hn1 H11. -csetoid_rewrite_cxt Hn2 H11. -csetoid_rewrite_cxt_rev Hn0 H11. -simpl. -cut (Z_of_nat (l - k) > 0)%Z. -intro H13. -set (H12:=(mod_nat_correct (n1-k)(l-k) H13)). -rewrite H12. -rewrite<- (inj_plus k (mod_nat (n1 - k) (l - k) H13)). -set (H15:=(mod_nat_correct (n2-k)(l-k) H13)). -rewrite H15. -rewrite<- (inj_plus k (mod_nat (n2 - k) (l - k) H13)). -rewrite<- (inj_plus (k + mod_nat (n1 - k) (l - k) H13) - (k + mod_nat (n2 - k) (l - k) H13)). -apply inj_eq. -apply w_inj with k l. -apply surj_lt. -rewrite (inj_plus (k + mod_nat (n1 - k) (l - k) H13) - (k + mod_nat (n2 - k) (l - k) H13)). -rewrite (inj_plus k ( mod_nat (n1 - k) (l - k) H13)). -rewrite (inj_plus k (mod_nat (n2 - k) (l - k) H13)). -rewrite<- H12. -rewrite<- H15. -replace (Z_of_nat l) with (Z_of_nat k + Z_of_nat (l - k))%Z. -exact z. -cut (k<=l). -intro H16. -rewrite (inj_minus1 l k H16). -intuition. -intuition. - -intuition. -intuition. - -csetoid_rewrite_rev H11. -csetoid_rewrite (power_plus M c0 n1 n2). -cut (k - l <= n2 -> - power_CMonoid c0 n2[=]b -> - l <= n1 -> - power_CMonoid c0 n1[=]a -> - n0 < l -> - (Z_of_nat k + - (Z_of_nat k + Z_of_nat (n1 - k) mod Z_of_nat (l - k) + - (Z_of_nat k + Z_of_nat (n2 - k) mod Z_of_nat (l - k)) - - Z_of_nat k) mod Z_of_nat (l - k))%Z = Z_of_nat n0. -intro z. -intros. -set (H11:= (power_plus M c0 n1 n2 )). -csetoid_rewrite_cxt Hn1 H11. -csetoid_rewrite_cxt Hn2 H11. -csetoid_rewrite_cxt_rev Hn0 H11. -simpl. -cut (Z_of_nat (l - k) > 0)%Z. -intro H13. -set (H12:=(mod_nat_correct (n1-k)(l-k) H13)). -rewrite H12. -rewrite<- (inj_plus k (mod_nat (n1 - k) (l - k) H13)). -set (H15:=(mod_nat_correct (n2-k)(l-k) H13)). -rewrite H15. -rewrite<- (inj_plus k (mod_nat (n2 - k) (l - k) H13)). -rewrite<- (inj_plus (k + mod_nat (n1 - k) (l - k) H13) - (k + mod_nat (n2 - k) (l - k) H13)). -rewrite<- (inj_minus1 (k + mod_nat (n1 - k) (l - k) H13 + (k + mod_nat (n2 - k) (l - k) H13)) k). -rewrite (mod_nat_correct (k + mod_nat (n1 - k) (l - k) H13 + (k + mod_nat (n2 - k) (l - k) H13) - - k) (l-k) H13). -rewrite<- (inj_plus k (mod_nat - (k + mod_nat (n1 - k) (l - k) H13 + - (k + mod_nat (n2 - k) (l - k) H13) - k) (l - k) H13)). -2:intuition. -apply inj_eq. -apply w_inj with k l. -apply surj_lt. -rewrite (inj_plus k (mod_nat - (k + mod_nat (n1 - k) (l - k) H13 + - (k + mod_nat (n2 - k) (l - k) H13) - k) (l - k) H13)). -rewrite<- (mod_nat_correct (k + mod_nat (n1 - k) (l - k) H13 + - (k + mod_nat (n2 - k) (l - k) H13) - k) (l - k) H13). -set (H16:=(Z_mod_lt (Z_of_nat ((k + mod_nat (n1 - k) (l - k) H13 + (k + mod_nat (n2 - k) (l - k) H13) - - k))) (Z_of_nat(l-k))H13)). -elim H16. -clear H16. -intros H16 H17. -cut ( Z_of_nat ((k + mod_nat (n1 - k) (l - k) H13 + (k + mod_nat (n2 - k) (l - k) H13) - - k)) mod Z_of_nat (l - k) < Z_of_nat l%Z -(Z_of_nat k))%Z. -intuition. -cut (k<=l). -intro H18. -rewrite<- (inj_minus1 l k H18). -exact H17. - -intuition. -intuition. -intuition. - -cut (k<(k + mod_nat (n1 - k) (l - k) H13 + - (k + mod_nat (n2 - k) (l - k) H13))). -intro H16. -csetoid_rewrite_rev (power_mod k l (k + mod_nat (n1 - k) (l - k) H13 + - (k + mod_nat (n2 - k) (l - k) H13)) H13 H16 smallest). -csetoid_rewrite_rev H11. -csetoid_rewrite (power_plus M c0 n1 n2). -cut (k - n2 < l -> - power_CMonoid c0 n2[=]b -> - l <= n1 -> - power_CMonoid c0 n1[=]a -> - n0 < l -> - (Z_of_nat k + Z_of_nat (n1 - k) mod Z_of_nat (l - k) + Z_of_nat n2)%Z = - Z_of_nat n0. -intros. -set (H11:= (power_plus M c0 n1 n2 )). -csetoid_rewrite_cxt Hn1 H11. -csetoid_rewrite_cxt Hn2 H11. -csetoid_rewrite_cxt_rev Hn0 H11. -simpl. -cut (Z_of_nat (l - k) > 0)%Z. -intro H13. -set (H12:=(mod_nat_correct (n1-k)(l-k) H13)). -rewrite H12. -rewrite<- (inj_plus k (mod_nat (n1 - k) (l - k) H13)). -rewrite<- (inj_plus (k + mod_nat (n1 - k) (l - k) H13) n2). -apply inj_eq. -apply w_inj with k l. -apply surj_lt. -rewrite (inj_plus (k + mod_nat (n1 - k) (l - k) H13) n2). -rewrite (inj_plus k ( mod_nat (n1 - k) (l - k) H13)). -rewrite<- H12. -set (H16:=(Z_mod_lt (Z_of_nat (n1-k)) (Z_of_nat(l-k))H13)). -elim H16. -clear H16. -intros H16 H17. -cut ( Z_of_nat (n1 - k) mod Z_of_nat (l - k) + Z_of_nat n2 < - Z_of_nat l - Z_of_nat k)%Z. -intuition. -cut (k<=l). -intro H18. -rewrite<- (inj_minus1 l k H18). -intuition. -intuition. -intuition. -intuition. - -csetoid_rewrite_rev H11. -csetoid_rewrite (power_plus M c0 n1 n2). -cut (k - n2 < l -> - power_CMonoid c0 n2[=]b -> - l <= n1 -> - power_CMonoid c0 n1[=]a -> - n0 < l -> - (Z_of_nat k + - (Z_of_nat k + Z_of_nat (n1 - k) mod Z_of_nat (l - k) + Z_of_nat n2 - - Z_of_nat k) mod Z_of_nat (l - k))%Z = Z_of_nat n0. -intros. -set (H11:= (power_plus M c0 n1 n2 )). -csetoid_rewrite_cxt Hn1 H11. -csetoid_rewrite_cxt Hn2 H11. -csetoid_rewrite_cxt_rev Hn0 H11. -simpl. -cut (Z_of_nat (l - k) > 0)%Z. -intro H13. -set (H12:=(mod_nat_correct (n1-k)(l-k) H13)). -rewrite H12. -rewrite<- (inj_plus k (mod_nat (n1 - k) (l - k) H13)). -rewrite<- (inj_plus (k + mod_nat (n1 - k) (l - k) H13) - n2). -rewrite<- (inj_minus1 (k + mod_nat (n1 - k) (l - k) H13 + n2) k). -rewrite (mod_nat_correct (k + mod_nat (n1 - k) (l - k) H13 + n2 - - k) (l-k) H13). -rewrite<- (inj_plus k (mod_nat (k + mod_nat (n1 - k) (l - k) H13 + n2 - k) (l - k) H13)). -2:intuition. -apply inj_eq. -apply w_inj with k l. -apply surj_lt. -rewrite (inj_plus k (mod_nat - (k + mod_nat (n1 - k) (l - k) H13 + - n2 - k )(l - k) H13)). -rewrite<- (mod_nat_correct (k + mod_nat (n1 - k) (l - k) H13 + - n2 - k) (l - k) H13). -set (H16:=(Z_mod_lt (Z_of_nat ((k + mod_nat (n1 - k) (l - k) H13 + n2 - - k))) (Z_of_nat(l-k))H13)). -elim H16. -clear H16. -intros H16 H17. -cut ( Z_of_nat ((k + mod_nat (n1 - k) (l - k) H13 + n2 - - k)) mod Z_of_nat (l - k) < Z_of_nat l%Z -(Z_of_nat k))%Z. -intuition. -cut (k<=l). -intro H18. -rewrite<- (inj_minus1 l k H18). -exact H17. - -intuition. -intuition. - - -exact smallest. - -cut (k<(k + mod_nat (n1 - k) (l - k) H13 + - n2 )). -intro H16. -csetoid_rewrite_rev (power_mod k l (k + mod_nat (n1 - k) (l - k) H13 + - n2) H13 H16 smallest). - -csetoid_rewrite_rev H11. -csetoid_rewrite (power_plus M c0 n1 n2). -cut (k - n2 < l -> - power_CMonoid c0 n2[=]b -> - n1 < l -> - power_CMonoid c0 n1[=]a -> - n0 < l -> (Z_of_nat n1 + Z_of_nat n2)%Z = Z_of_nat n0. -intros H0 H1 H2 H4 H6 H7. -set (H11:= (power_plus M c0 n1 n2 )). -csetoid_rewrite_cxt Hn1 H11. -csetoid_rewrite_cxt Hn2 H11. -csetoid_rewrite_cxt_rev Hn0 H11. -simpl. -rewrite<- (inj_plus n1 n2). -apply inj_eq. -apply w_inj with k l. -apply surj_lt. -rewrite (inj_plus n1 n2). -rewrite (inj_minus1 l k ) in H0. -intuition. - -intuition. -intuition. -intuition. -exact H11. -Qed. - -Lemma Char12:(Z_of_nat k + Z_of_nat (l - k) <= Z_of_nat n1 + Z_of_nat n2)%Z -> - n2 < l -> - power_CMonoid c0 n2[=]b -> - n1 < l -> - power_CMonoid c0 n1[=]a -> - n0 < l -> - (Z_of_nat k + (Z_of_nat n1 + Z_of_nat n2 - Z_of_nat k) mod Z_of_nat (l - k))%Z = - Z_of_nat n0. -intros. -set (H11:= (power_plus M c0 n1 n2 )). -csetoid_rewrite_cxt Hn1 H11. -csetoid_rewrite_cxt Hn2 H11. -csetoid_rewrite_cxt_rev Hn0 H11. -simpl. -rewrite<- (inj_plus n1 - n2). -rewrite<- (inj_minus1 (n1 + n2) k). -cut (Z_of_nat (l - k) > 0)%Z. -intro H13. -rewrite (mod_nat_correct ( n1 + n2 - - k) (l-k) H13). -rewrite<- (inj_plus k (mod_nat (n1 + n2 - k) (l - k) H13)). -apply inj_eq. -apply w_inj with k l. -apply surj_lt. -rewrite (inj_plus k (mod_nat - ( n1 + - n2 - k )(l - k) H13)). -rewrite<- (mod_nat_correct (n1 + - n2 - k) (l - k) H13). -set (H16:=(Z_mod_lt (Z_of_nat ((n1+ n2 - - k))) (Z_of_nat(l-k))H13)). -elim H16. -clear H16. -intros H16 H17. -cut ( Z_of_nat (( n1+ n2 - - k)) mod Z_of_nat (l - k) < Z_of_nat l%Z -(Z_of_nat k))%Z. -intuition. -cut (k<=l). -intro H18. -rewrite<- (inj_minus1 l k H18). -exact H17. - -intuition. -intuition. - - -exact smallest. - -cut (k<( n1 + - n2 )). -intro H16. -csetoid_rewrite_rev (power_mod k l (n1 + - n2) H13 H16 smallest). - -csetoid_rewrite_rev H11. -apply eq_reflexive. -intuition. -rewrite (inj_minus1 l k). -intuition. -intuition. -intuition. -Qed. - -End Char. -Section MP. - -Variable M:CMonoid. -Variable u:M. -Variable gen:(is_generator M u). -Variable k l:nat. -Variable smallest: k < l - and power_CMonoid u k[=] - power_CMonoid u l - and (forall k0 l0 : nat, k0<>l0 and - (k0 < k or k0 = k and l0 < l) -> - power_CMonoid u k0[#] - power_CMonoid u l0). -Variable a b:cs_crr (csg_crr (cm_crr M)). -Variable H3: k >= 0. -Let H4:=(inj_ge k 0 H3 ). -Variable H7:((l - k)%nat > 0)%Z. -Variable H5: l - k > 0. -Let H6:=(inj_gt (l - k) 0 H5 ). - -Lemma pres_mult:( - csf_fun M (C_as_CMonoid k (l - k)%nat H6 H4) - (to_C_as_csf M u k l H7 H4 gen smallest) (csbf_fun M M M (csg_op (c:=M)) a b)[=] - csbf_fun (C_as_CMonoid k (l - k)%nat H6 H4) - (C_as_CMonoid k (l - k)%nat H6 H4) (C_as_CMonoid k (l - k)%nat H6 H4) - (csg_op (c:=C_as_CMonoid k (l - k)%nat H6 H4)) - (csf_fun M (C_as_CMonoid k (l - k)%nat H6 H4) - (to_C_as_csf M u k l H7 H4 gen smallest ) a) - (csf_fun M (C_as_CMonoid k (l - k)%nat H6 H4) - (to_C_as_csf M u k l H7 H4 gen smallest ) b)). -simpl. -unfold ZFeq. -unfold to_C. -unfold sigT_rec. -unfold sigT_rect. -set (power_mod :=(power_k_n M u)). -set (w_inj:=(weakly_inj1 M u)). -case ( gen (csbf_fun M M M (csg_op (c:=M)) a b)). -intros n0 Hn0. -case (le_lt_dec l n0). -unfold C_plus. -unfold ZF_rec. -unfold ZF_rect. -case (gen a). -intros n1 Hn1. -case (le_lt_dec l n1). -case (gen b). -intros n2 Hn2. -case (le_lt_dec l n2). -unfold sumbool_rec. -unfold sumbool_rect. -case (Z_lt_le_dec - (k + (n1 - k)%nat mod (l - k)%nat + - (k + (n2 - k)%nat mod (l - k)%nat)) (k + (l - k)%nat)). -(* 1 *) -intros. -apply Char1 with M u a b. -exact H5. -intros. -apply power_mod. -exact gen. -exact H. -exact X. -intros. -apply w_inj with k0 l3. -exact gen. -exact H. -exact H0. -exact X. -exact H1. -exact smallest. -exact Hn0. -exact Hn1. -exact Hn2. -exact z. -exact l1. -exact l2. -exact l0. - -(* 2 *) -intros. -apply Char2 with M u a b. -exact H5. -intros. -apply power_mod. -exact gen. -exact H. -exact X. -intros. -apply w_inj with k0 l3. -exact gen. -exact H. -exact H0. -exact X. -exact H1. -exact smallest. -exact Hn0. -exact Hn1. -exact Hn2. -exact z. -exact l1. -exact l0. -exact l2. - -unfold sumbool_rec. -unfold sumbool_rect. -case (Z_lt_le_dec (k + (n1 - k)%nat mod (l - k)%nat + n2) (k + (l - k)%nat)). - -(* 3 *) -intros. -apply Char3 with M u a b. -exact H5. -intros. -apply power_mod. -exact gen. -exact H. -exact X. -intros. -apply w_inj with k0 l3. -exact gen. -exact H. -exact H0. -exact X. -exact H1. -exact smallest. -exact Hn0. -exact Hn1. -exact Hn2. -exact z. -exact l0. -exact l1. -exact l2. - -(* 4 *) -intros. -apply Char4 with M u a b. -exact H5. -intros. -apply power_mod. -exact gen. -exact H. -exact X. -intros. -apply w_inj with k0 l3. -exact gen. -exact H. -exact H0. -exact X. -exact H1. -exact smallest. -exact Hn0. -exact Hn1. -exact Hn2. -exact z. -exact l0. -exact l1. -exact l2. - -case (gen b). -intros n2. -case (le_lt_dec l n2). -unfold sumbool_rec. -unfold sumbool_rect. -case ( Z_lt_le_dec (n1 + (k + (n2 - k)%nat mod (l - k)%nat)) - (k + (l - k)%nat)). - -(* 5 *) -intros z l2 Hn2 l1 l0. -replace (n1 + (k + (n2 - k)%nat mod (l - k)%nat))%Z with - ((k + (n2 - k)%nat mod (l - k)%nat)+ n1)%Z. -apply Char3 with M u b a. -exact H5. -intros. -apply power_mod. -exact gen. -exact H. -exact X. -intros. -apply w_inj with k0 l3. -exact gen. -exact H. -exact H0. -exact X. -exact H1. -exact smallest. -set (H8:= (cyc_imp_comm M (generator_imp_cyclic M u gen))). -unfold commutes in H8. -set (H9:= (H8 b a)). -csetoid_rewrite H9. -exact Hn0. -exact Hn2. -exact Hn1. -replace (k + (n2 - k)%nat mod (l - k)%nat + n1)%Z with - (n1 + (k + (n2 - k)%nat mod (l - k)%nat))%Z. -exact z. -intuition. -exact l1. -exact l2. -exact l0. -intuition. - -(* 6 *) -intros z l2 Hn2 l1 l0. -replace (k + (n1 + (k + (n2 - k)%nat mod (l - k)%nat) - k) mod (l - k)%nat)%Z - with (k + (k + (n2 - k)%nat mod (l - k)%nat+n1 - k) mod (l - k)%nat)%Z. -apply Char4 with M u b a. -exact H5. -intros. -apply power_mod. -exact gen. -exact H. -exact X. -intros. -apply w_inj with k0 l3. -exact gen. -exact H. -exact H0. -exact X. -exact H1. -exact smallest. -set (H8:= (cyc_imp_comm M (generator_imp_cyclic M u gen))). -unfold commutes in H8. -set (H9:= (H8 b a)). -csetoid_rewrite H9. -exact Hn0. -exact Hn2. -exact Hn1. -replace (k + (n2 - k)%nat mod (l - k)%nat + n1)%Z with - (n1 + (k + (n2 - k)%nat mod (l - k)%nat))%Z. -exact z. -intuition. -exact l1. -exact l2. -exact l0. -replace (k + (n2 - k)%nat mod (l - k)%nat + n1 - k)%Z with - (n1 + (k + (n2 - k)%nat mod (l - k)%nat) - k)%Z. -reflexivity. -intuition. - -unfold sumbool_rec. -unfold sumbool_rect. -case (Z_lt_le_dec (n1 + n2) (k + (l - k)%nat)). - -(* 7 *) -intros z l2 Hn2 l1 l0. -apply Char5 with M u a b. -exact H5. -intros. -apply power_mod. -exact gen. -exact H. -exact X. -intros. -apply w_inj with k0 l3. -exact gen. -exact H. -exact H0. -exact X. -exact H1. -exact smallest. -exact Hn0. -exact Hn1. -exact Hn2. -exact z. -exact l2. -exact Hn2. -exact l1. -exact l0. - -(* 8 *) -intros z l2 Hn2 l1 l0. -apply Char6 with M u a b. -exact H5. -intros. -apply power_mod. -exact gen. -exact H. -exact X. -intros. -apply w_inj with k0 l3. -exact gen . -exact H. -exact H0. -exact X. -exact H1. -exact smallest. -exact Hn0. -exact Hn1. -exact Hn2. -exact z. -exact l2. -exact Hn2. -exact l1. -exact l0. - -unfold C_plus. -unfold ZF_rec. -unfold ZF_rect. -case (gen a). -intro n1. -case (le_lt_dec l n1). -case (gen b). -intro n2. -case (le_lt_dec l n2). -unfold sumbool_rec. -unfold sumbool_rect. -case ( Z_lt_le_dec - (k + (n1 - k)%nat mod (l - k)%nat + - (k + (n2 - k)%nat mod (l - k)%nat)) (k + (l - k)%nat)). - -(* 9 *) -intros z l2 Hn2 l1 Hn1 l0. -apply Char7 with M u a b. -exact H5. -intros. -apply power_mod. -exact gen. -exact H. -exact X. -intros. -apply w_inj with k0 l3. -exact gen. -exact H. -exact H0. -exact X. -exact H1. -exact smallest. -exact Hn0. -exact Hn1. -exact Hn2. -exact z. -exact l2. -exact Hn2. -exact l1. -exact Hn1. -exact l0. - -(* 10 *) -intros z l2 Hn2 l1 Hn1 l0. -apply Char8 with M u a b. -exact H5. -intros. -apply power_mod. -exact gen. -exact H. -exact X. -intros. -apply w_inj with k0 l3. -exact gen. -exact H. -exact H0. -exact X. -exact H1. -exact smallest. -exact Hn0. -exact Hn1. -exact Hn2. -exact z. -exact l2. -exact Hn2. -exact l1. -exact Hn1. -exact l0. - -unfold sumbool_rec. -unfold sumbool_rect. -case ( Z_lt_le_dec (k + (n1 - k)%nat mod (l - k)%nat + n2) (k + (l - k)%nat)). - -(* 11 *) -intros z l2 Hn2 l1 Hn1 l0. -apply Char9 with M u a b. -exact H5. -intros. -apply power_mod. -exact gen. -exact H. -exact X. -intros. -apply w_inj with k0 l3. -exact gen. -exact H. -exact H0. -exact X. -exact H1. -exact smallest. -exact Hn0. -exact Hn1. -exact Hn2. -exact z. -exact l2. -exact Hn2. -exact l1. -exact Hn1. -exact l0. - -(* 12 *) -intros z l2 Hn2 l1 Hn1 l0. -apply Char10 with M u a b. -exact H5. -intros. -apply power_mod. -exact gen. -exact H. -exact X. -intros. -apply w_inj with k0 l3. -exact gen. -exact H. -exact H0. -exact X. -exact H1. -exact smallest. -exact Hn0. -exact Hn1. -exact Hn2. -exact z. -exact l2. -exact Hn2. -exact l1. -exact Hn1. -exact l0. - -case (gen b). -intro n2. -case (le_lt_dec l n2). -unfold sumbool_rec. -unfold sumbool_rect. -case ( Z_lt_le_dec (n1 + (k + (n2 - k)%nat mod (l - k)%nat)) - (k + (l - k)%nat)). - -(* 13 *) -intros z l2 Hn2 l1 Hn1 l0. -replace (n1 + (k + (n2 - k)%nat mod (l - k)%nat))%Z with - (k + (n2 - k)%nat mod (l - k)%nat+ n1)%Z. -apply Char9 with M u b a. -exact H5. -intros. -apply power_mod. -exact gen. -exact H. -exact X. -intros. -apply w_inj with k0 l3. -exact gen. -exact H. -exact H0. -exact X. -exact H1. -exact smallest. -set (H8:= (cyc_imp_comm M (generator_imp_cyclic M u gen))). -unfold commutes in H8. -set (H9:= (H8 b a)). -csetoid_rewrite H9. -exact Hn0. -exact Hn2. -exact Hn1. -replace (k + (n2 - k)%nat mod (l - k)%nat + n1)%Z with - (n1 + (k + (n2 - k)%nat mod (l - k)%nat))%Z. -exact z. -intuition. -exact l1. -exact Hn1. -exact l2. -exact Hn2. -exact l0. -intuition. - -(* 14 *) -intros z l2 Hn2 l1 Hn1 l0. -replace (k + (n1 + (k + (n2 - k)%nat mod (l - k)%nat) - k) mod (l - k)%nat)%Z - with (k + (k + (n2 - k)%nat mod (l - k)%nat+n1 - k) mod (l - k)%nat)%Z. -apply Char10 with M u b a. -exact H5. -intros. -apply power_mod. -exact gen. -exact H. -exact X. -intros. -apply w_inj with k0 l3. -exact gen. -exact H. -exact H0. -exact X. -exact H1. -exact smallest. -set (H8:= (cyc_imp_comm M (generator_imp_cyclic M u gen))). -unfold commutes in H8. -set (H9:= (H8 b a)). -csetoid_rewrite H9. -exact Hn0. -exact Hn2. -exact Hn1. -replace (k + (n2 - k)%nat mod (l - k)%nat + n1)%Z with - (n1 + (k + (n2 - k)%nat mod (l - k)%nat))%Z. -exact z. -intuition. -exact l1. -exact Hn1. -exact l2. -exact Hn2. -exact l0. -replace ((k + (n2 - k)%nat mod (l - k)%nat + n1 - k) mod (l - k)%nat)%Z with - ((n1 + (k + (n2 - k)%nat mod (l - k)%nat) - k) mod (l - k)%nat)%Z. -reflexivity. -set (q:=(k + (n2 - k)%nat mod (l - k)%nat)%Z). -replace (n1+q-k)%Z with (q+n1-k)%Z. -reflexivity. -intuition. - -unfold sumbool_rec. -unfold sumbool_rect. -case (Z_lt_le_dec (n1 + n2) (k + (l - k)%nat)). - -(* 15 *) -intros z l2 Hn2 l1 Hn1 l0. -apply Char11 with M k l u a b. -exact H5. -intros. -apply power_mod. -exact gen. -exact H. -exact X. -intros. -apply w_inj with k0 l3. -exact gen. -exact H. -exact H0. -exact X. -exact H1. -apply smallest. -exact Hn0. -exact Hn1. -exact Hn2. -exact z. -exact l2. -exact Hn2. -exact l1. -exact Hn1. -exact l0. - -(* 16 *) -intros z l2 Hn2 l1 Hn1 l0. -apply Char12 with M u a b. -exact H5. -intros. -apply power_mod. -exact gen. -exact H. -exact X. -intros. -apply w_inj with k0 l3. -exact gen. -exact H. -exact H0. -exact X. -exact H1. -exact smallest. -exact Hn0. -exact Hn1. -exact Hn2. -exact z. -exact l2. -exact Hn2. -exact l1. -exact Hn1. -exact l0. -Qed. - -End MP. -Section ZP. - -Variable M:CMonoid. -Variable u:M. -Variable gen: (is_generator M u). -Variable l k: nat. -Variable smallest:k < l - and power_CMonoid u k[=] - power_CMonoid u l - and (forall k0 l0 : nat, k0<>l0 and - (k0 < k or k0 = k and l0 < l) -> - power_CMonoid u k0[#] - power_CMonoid u l0). -Variable H3:k >= 0. -Let H4:=(inj_ge k 0 H3). -Variable H7:((l - k)%nat > 0)%Z. -Variable H5: l - k > 0. -Let H6:= (inj_gt (l - k) 0 H5). - -Lemma pres_zero:csf_fun M (C_as_CMonoid k (l - k)%nat H6 H4) - (to_C_as_csf M u k l H7 H4 gen smallest ) Zero[=]Zero. -simpl. -unfold ZFeq. -unfold to_C. -unfold sigT_rect. -set (power_mod:=(power_k_n M u)). -set (w_inj:=(weakly_inj1 M u)). -case (gen (@cm_unit M)). -intros i H2. - -case (le_lt_dec l i). -intro H9. -elim smallest. -clear smallest. -intros H21 H20. -elim H20. -clear H20. -intros H20 H19. -set (H8:=(H19 0 i)). -cut (Cdecidable ( 0 < k or 0 = k and i < l)). -intro H10. -unfold Cdecidable in H10. -elim H10. -clear H10. -intro H10. -cut (0<>i). -intro H10'. -cut (0<>i and (0 < k or 0 = k and i < l)). -intro H10''. -set (H11:= (H8 H10'')). -simpl. -csetoid_replace_cxt (@cm_unit M) (power_CMonoid u 0) H2. -set (H12:=(eq_imp_not_ap M ( power_CMonoid u i)(power_CMonoid u 0)H2)). -set (H13:=(ap_symmetric_unfolded M (power_CMonoid u 0)(power_CMonoid u i) -H11)). -unfold Not in H12. -intuition. -simpl. -apply eq_reflexive. - -intuition. -intuition. - -intro H11. -cut (k=0). -simpl. -intro H12. -rewrite H12. -simpl. -set (H13:=(Z_eq_dec ((i - 0)%nat mod (l - 0)%nat)%Z 0)). -elim H13. -clear H13. -intro H13. -intuition. -clear H13. -intro H13. -cut False. -intuition. -csetoid_replace_cxt (@cm_unit M) (power_CMonoid u 0) H2. -cut (l>0)%Z. -intro H14. -cut ((power_CMonoid u 0)[=](power_CMonoid u (mod_nat i l H14))). -3:intuition. -intro H15. -cut ((mod_nat i l H14)0)%Z. -intro H16. -set (H17:= (Z_mod_lt i l H16)). -intuition. - -intuition. - -csetoid_rewrite_rev H2. -cut (Z_of_nat (l - 0) > 0)%Z. -intro H15. -replace (mod_nat i l H14) with (0+(mod_nat (i-0)(l-0) H15)). -apply power_mod. -exact gen. -intuition. - -split. -intuition. -split. -rewrite<- H12. -exact H20. - -intuition. - -replace (i-0) with i. -2:intuition. -simpl. -apply mod_nat_pi. -intuition. - -replace (l-0) with l. -intuition. -intuition. - -simpl. -apply eq_reflexive. - -apply k_zero with i l. -exact H11. - -apply lexi_dec. - -(* il0 and - (k0 < k or k0 = k and l0 < l) -> - power_CMonoid u k0[#] - power_CMonoid u l0). -Variable H7:((l - k)%nat > 0)%Z. -Variable H4: (k >= 0)%Z. -Section IL. - -Variable a0 : M. -Variable a1 : M. -Variable ap : a0[#]a1. -Variable H1 : k < l. -Variable power_mod : forall (n : nat) (H2 : (Z_of_nat (l - k) > 0)%Z), - k < n -> - k < l - and power_CMonoid u k[=]power_CMonoid u l - and ((forall k0 l0 : nat, k0<>l0 and - (k0 < k or k0 = k and l0 < l) -> - power_CMonoid u k0[#]power_CMonoid u l0):CProp) -> - power_CMonoid u n[=] - power_CMonoid u (k + mod_nat (n - k) (l - k) H2). - -Lemma power_inj: forall (n0 n1:nat), -(power_CMonoid u n0[#]power_CMonoid u n1)-> n0<>n1. -intros n0 n1 H2 H3. -rewrite H3 in H2. -set (H8:=(ap_imp_neq M (power_CMonoid u n1)(power_CMonoid u n1) H2)). -unfold cs_neq in H8. -apply H8. -apply eq_reflexive. -Qed. - -Lemma to_C_inj1:forall(n0 : nat) - (Hn0 : power_CMonoid u n0[=]a0) - (n1 : nat), - l <= n1 -> - power_CMonoid u n1[=]a1 -> - l <= n0 -> - (k + (n1 - k)%nat mod (l - k)%nat)%Z <> - (k + (n0 - k)%nat mod (l - k)%nat)%Z. -intros n0 Hn0 n1 l1 Hn1 l0. -cut (Z_of_nat (l - k) > 0)%Z. -intro H13. -set (H3:=(mod_nat_correct (n1-k)(l-k) H13)). -rewrite H3. -set (H5:=(mod_nat_correct (n0-k)(l-k) H13)). -rewrite H5. -rewrite<- (inj_plus k ((mod_nat (n1 - k) (l - k) H13))%Z). -rewrite<- (inj_plus k ((mod_nat (n0 - k) (l - k) H13))%Z). -apply inj_neq. -unfold neq. -apply power_inj. -csetoid_replace (power_CMonoid u (k + mod_nat (n1 - k) (l - k) H13)) - (power_CMonoid u n1). -csetoid_replace (power_CMonoid u (k + mod_nat (n0 - k) (l - k) H13)) - (power_CMonoid u n0). -csetoid_rewrite Hn0. -csetoid_rewrite Hn1. -apply ap_symmetric_unfolded. -exact ap. -apply eq_symmetric_unfolded. -apply power_mod. -intuition. -intuition. - -apply eq_symmetric_unfolded. -intuition. -rewrite (inj_minus1 l k). -intuition. -intuition. -Qed. - -Lemma to_C_inj2:forall(n0 : nat) - (Hn0 : power_CMonoid u n0[=]a0) - (n1 : nat), n1 < l -> - power_CMonoid u n1[=]a1 -> - l <= n0 -> - Z_of_nat n1 <> (Z_of_nat k + Z_of_nat (n0 - k) mod Z_of_nat (l - k))%Z. -intros n0 Hn0 n1 l1 Hn1 l0. -cut (Z_of_nat (l - k) > 0)%Z. -intro H13. -set (H5:=(mod_nat_correct (n0-k)(l-k) H13)). -rewrite H5. -rewrite<- (inj_plus k ((mod_nat (n0 - k) (l - k) H13))%Z). -apply inj_neq. -unfold neq. -apply power_inj. -csetoid_replace (power_CMonoid u (k + mod_nat (n0 - k) (l - k) H13)) - (power_CMonoid u n0). -csetoid_rewrite Hn0. -csetoid_rewrite Hn1. -apply ap_symmetric_unfolded. -exact ap. -apply eq_symmetric_unfolded. -apply power_mod. -intuition. -intuition. -rewrite (inj_minus1 l k). -intuition. -intuition. -Qed. - -End IL. - -Lemma to_C_inj:injective (to_C_as_csf M u k l H7 H4 gen smallest). -unfold to_C_as_csf. -unfold injective. -simpl. -unfold to_C. -unfold ZFap. -intros a0 a1 ap. -unfold sigT_rect. -elim smallest. -set (power_mod:= power_k_n M u k l). -case (gen a0). -intros n0 Hn0. -case (le_lt_dec l n0). -case (gen a1). -intros n1. -case (le_lt_dec l n1). - -(* 1 *) - -intros l0 c0 l1 a b. -apply to_C_inj1 with a0 a1. -exact ap. -intuition. -intros. -apply power_mod. -exact gen. -intuition. -intuition. -exact Hn0. -exact l0. -exact c0. -exact l1. - -(* 2 *) - -intros l0 c0 l1 a b. -apply to_C_inj2 with a0 a1. -exact ap. -intuition. -intros. -apply power_mod. -exact gen. -intuition. -intuition. -exact Hn0. -exact l0. -exact c0. -exact l1. - -case (gen a1). -intro n1. -case (le_lt_dec l n1). - -(* 3 *) - -intros l0 c0 l1 a b. -cut (Z_of_nat n0 <> (Z_of_nat k + Z_of_nat (n1 - k) mod Z_of_nat (l - k))%Z). -intuition. -apply to_C_inj2 with a1 a0. -apply ap_symmetric_unfolded. -exact ap. -intuition. -intros. -apply power_mod. -exact gen. -intuition. -intuition. -exact c0. -exact l1. -exact Hn0. -exact l0. - -(* 4 *) - -intros l0 c0 l1 a b. -apply inj_neq. -unfold neq. -apply power_inj. -csetoid_rewrite Hn0. -csetoid_rewrite c0. -apply ap_symmetric_unfolded. -exact ap. -Qed. - -Lemma to_C_surj:surjective (to_C_as_csf M u k l H7 H4 gen smallest). -unfold surjective. -simpl. -intro b. -case b. -intros b' brf0 bprf1. -simpl. -unfold to_C. -unfold sigT_rect. -set (w_inj:= (weakly_inj1 M u k l)). -set (power_mod:=(power_k_n M u k l)). -exists (power_CMonoid u (Z_to_nat bprf1)). -case (gen (power_CMonoid u (Z_to_nat bprf1))). -intros b'' Hb'. -case (le_lt_dec l b''). -simpl. -2:simpl. -intro H3. -cut (Z_of_nat (l - k) > 0)%Z. -intro H6. -set (H5:=(mod_nat_correct (b''-k) (l-k) H6)). -rewrite H5. -rewrite<- (inj_plus k (mod_nat (b'' - k) (l - k) H6)). -rewrite (Z_to_nat_correct bprf1). -apply inj_eq. -apply w_inj. -exact gen. -apply surj_lt. -rewrite<- (Z_to_nat_correct bprf1). -replace (Z_of_nat k + Z_of_nat (l - k))%Z with (Z_of_nat l) in brf0. -exact brf0. - -rewrite (inj_minus1 l k). -intuition. -intuition. - -apply surj_lt. -rewrite (inj_plus k ( mod_nat (b'' - k) (l - k) H6)). -rewrite<- H5. -cut (Z_of_nat l - Z_of_nat k > 0)%Z. -intro H9. -set (H8:= (Z_mod_lt (b''-k)(l-k)H9)). -rewrite (inj_minus1 b'' k). -elim H8. -clear H8. -intros H8 H8'. -rewrite (inj_minus1 l k). -intuition. -intuition. -intuition. -intuition. -intuition. -csetoid_replace (power_CMonoid u (k + mod_nat (b'' - k) (l - k) H6)) - ( power_CMonoid u b''). -apply eq_symmetric_unfolded. -exact Hb'. - -apply eq_symmetric_unfolded. -apply power_mod. -intuition. -intuition. -intuition. - -intuition. -intro H3. -rewrite (Z_to_nat_correct bprf1). -apply inj_eq. -apply w_inj. -exact gen. -apply surj_lt. -rewrite<- (Z_to_nat_correct bprf1). -replace (Z_of_nat k + Z_of_nat (l - k))%Z with (Z_of_nat l) in brf0. -exact brf0. - - -rewrite (inj_minus1 l k). -intuition. -intuition. -exact H3. -intuition. -apply eq_symmetric_unfolded. -exact Hb'. -Qed. - -End inj_surj. - -Definition cyc_to_nat: forall (M:CMonoid)(u:M), -(is_generator M u)->M->nat_as_CMonoid. -simpl. -intros M u gen m. -unfold is_generator in gen. -elim (gen m). -intros n genm. -exact n. -Defined. - -Section CTN. -Variable M:CMonoid. -Variable u:M. -Variable gen:(is_generator M u). - -Lemma cyc_to_nat_strext: (((forall (k l:nat),k -(power_CMonoid u k [#] power_CMonoid u l)) -:CProp) --> -(fun_strext (cyc_to_nat M u gen)):CProp):CProp. -intros inf. -unfold fun_strext. -intros a b. -unfold cyc_to_nat. -unfold sigT_rec. -unfold sigT_rect. -case (gen a). -case (gen b). -intros n1 Hn1 n0 Hn0 H3. -simpl in H3. -unfold ap_nat in H3. -unfold CNot in H3. -set (H4:= (lt_eq_lt_dec n0 n1)). -elim H4. -clear H4. -intro H4. -elim H4. -clear H4. -intro H4. -csetoid_rewrite_rev Hn1. -csetoid_rewrite_rev Hn0. -apply inf. -exact H4. - -intuition. -clear H4. -intro H4. -apply ap_symmetric_unfolded. -csetoid_rewrite_rev Hn1. -csetoid_rewrite_rev Hn0. -apply inf. -exact H4. -Qed. - -Definition cyc_to_nat_as_csf -(H0:(forall (k l:nat),k(power_CMonoid u k [#] power_CMonoid u l))):= -(Build_CSetoid_fun M nat_as_CMonoid (cyc_to_nat M u gen) (cyc_to_nat_strext H0)). - -Lemma weakly_inj2:forall (a b:nat), -(forall (k l:nat),k(power_CMonoid u k [#] power_CMonoid u l)) --> -(power_CMonoid u a[=]power_CMonoid u b )-> - a = b. -intros a b. -intros H1 H2. -set (H3:=(lt_eq_lt_dec a b)). -elim H3. -clear H3. -intro H3. -elim H3. -clear H3. -intro H3. -set (H4:=(H1 a b H3)). -set (H5:=(eq_imp_not_ap M (power_CMonoid u a)(power_CMonoid u b) H2)). -unfold Not in H5. -elim H5. -exact H4. - -tauto. -clear H3. -intro H3. -set (H4:=(H1 b a H3)). -set (H5:=(eq_imp_not_ap M (power_CMonoid u a)(power_CMonoid u b) H2)). -unfold Not in H5. -elim H5. -apply ap_symmetric_unfolded. -exact H4. -Qed. - -End CTN. -Section Th17. - -Variable M:CMonoid. -Variable u:M. -Variable gen:(is_generator M u). - -Theorem Th17_partI: -({k:nat | {l:nat |kl0 and (k0 -(power_CMonoid u k0 [#] power_CMonoid u l0) )}} - -> -{k:Z|{H0:(k>=0)%Z|{n:Z|{H:(n>0)%Z| (isomorphic M (C_as_CMonoid k n H H0))}}}}): - CProp. -simpl. -intros H'. -elim H'. -clear H'. -intros k H'. -elim H'. -clear H'. -intros l H'. -generalize H'. -exists (Z_of_nat k). -cut (k>=0). -intro H3. -set (H4:=(inj_ge k 0 H3)). -simpl in H4. -2: intuition. -exists H4. -exists (Z_of_nat (l- k))%Z. -cut (l-k>0). -2:intuition. -intro H5. -set (H6:=(inj_gt (l-k) 0 H5)). -simpl in H6. -exists H6. -unfold isomorphic. -cut ((l-k)%nat >0)%Z. -intro H7. -exists (to_C_as_csf M u k l H7 H4 gen H'). -2:intuition. -unfold isomorphism. -split. -unfold morphism. -split. -unfold H4. -unfold H6. -apply pres_zero. -intros a b. -unfold H4. -unfold H6. -apply pres_mult. - -unfold bijective. -split. -apply (to_C_inj M u gen k l H' H7 H4). -apply (to_C_surj M u gen k l H' H7 H4). -Qed. - -Theorem Th17_partII: -(((forall (k l:nat),k -(power_CMonoid u k [#] power_CMonoid u l)) - :CProp) - ->(isomorphic M nat_as_CMonoid)):CProp. -intros H'. -unfold isomorphic. -exists (cyc_to_nat_as_csf M u gen H'). -unfold isomorphism. -split. -unfold morphism. -simpl. -split. -unfold cyc_to_nat. -unfold sigT_rec. -unfold sigT_rect. -set (H88:= (weakly_inj2 M u)). -case (gen Zero). -intros n Hn. -apply H88. -exact H'. -simpl. -exact Hn. - -intros a b. -unfold cyc_to_nat. -unfold sigT_rec. -unfold sigT_rect. -set (H88:= (weakly_inj2 M u)). -case (gen (csbf_fun M M M (csg_op (c:=M)) a b)). -case (gen a). -case (gen b). -intros n2 l2 n1 l1 n0 l0. -apply H88. -exact H'. -csetoid_rewrite (power_plus M u n1 n2). -csetoid_rewrite l2. -csetoid_rewrite l1. -exact l0. - -unfold bijective. -split. -unfold injective. -intros a0 a1 H0. -unfold cyc_to_nat_as_csf. -simpl. -unfold cyc_to_nat. -unfold sigT_rec. -unfold sigT_rect. -case (gen a0). -case (gen a1). -intros n1 Hn1 n0 Hn0. -unfold ap_nat. -cut (n0<>n1). -unfold not. -unfold CNot. -intros H4 H5. -elim H4. -exact H5. - -apply power_inj with M u. -csetoid_rewrite Hn0. -csetoid_rewrite Hn1. -exact H0. - -unfold surjective. -simpl. -intro b. -set (H88:=(weakly_inj2 M u)). -exists (power_CMonoid u b). -unfold cyc_to_nat. -unfold sigT_rec. -unfold sigT_rect. -case (gen (power_CMonoid u b)). -intros n H1. -apply H88. -exact H'. -exact H1. -Qed. - -End Th17. - -Definition plus_nminus1:forall (n:Z)(H:(n>0)%Z)(H0:(0>=0)%Z), - (CSetoid_un_op (C_as_CMonoid 0%Z n H H0)). -simpl. -intros n H H0. -unfold CSetoid_un_op. -apply projected_bin_fun with (C_as_CMonoid 0%Z n H H0). -apply (@csg_op (C_as_CMonoid 0%Z n H H0)). - -simpl. -apply Build_ZF with (n-1)%Z. -intuition. -intuition. -Defined. - -Definition c_n_minus_a:forall (n:Z)(H:(n>0)%Z)(H0:(0>=0)%Z)(a:(C_as_CMonoid 0%Z n H H0)), -(C_as_CMonoid 0%Z n H H0). -simpl. -intros n H H0 a. -elim a. -intros a' aprf0 aprf1. -set (H1:=(Z_eq_dec a' 0)). -elim H1. -clear H1. -intro H1. -apply Build_ZF with 0%Z. -intuition. -intuition. - -clear H1. -intro H1. -apply Build_ZF with (n-a')%Z. -intuition. -intuition. -Defined. - -Lemma C_0_n:(forall (n:Z)(H:(n>0)%Z)(H0:(0>=0)%Z)(a:(C_as_CMonoid 0%Z n H H0)), -(invertible (C_as_CMonoid 0%Z n H H0) a)):CProp. -simpl. -intros n H H0 a. -unfold invertible. -simpl. -unfold is_inverse. -simpl. -exists (Const_CSetoid_fun (C_as_CSetoid 0 n H H0)(C_as_CSetoid 0 n H H0) (c_n_minus_a n H H0 a)). -simpl. -unfold c_n_minus_a. -unfold ZF_rec. -unfold ZF_rect. -unfold sumbool_rec. -unfold sumbool_rect. -case a. -intros a' aprf0 aprf1. -simpl. -unfold ZF_rec. -unfold ZF_rect. -case ( Z_eq_dec a' 0 ). -unfold sumbool_rec. -unfold sumbool_rect. -case ( Z_lt_le_dec (a' + 0) n). -simpl. -unfold sumbool_rec. -unfold sumbool_rect. -case ( Z_lt_le_dec (a'+0)(0+ n)). -simpl. -case (Z_lt_le_dec (0 + a') (0 + n)). -simpl. -intuition. - -simpl. -intuition. - -simpl. -unfold sumbool_rec. -unfold sumbool_rect. -case (Z_lt_le_dec (0+a')(0+ n)). -simpl. -intuition. - -simpl. -intros H1 H2 H3. -replace (a' +0 -0)%Z with a'. -replace (a'-0)%Z with a'. -cut ( 0%Z = (a' mod n)%Z). -intuition. -intuition. -intuition. -intuition. - -case (Z_lt_le_dec (a' + 0) (0 + n)). -simpl. -unfold sumbool_rec. -unfold sumbool_rect. -case (Z_lt_le_dec (0 + a') (0 + n)). -simpl. -intuition. -simpl. -intuition. - -simpl. -unfold sumbool_rec. -unfold sumbool_rect. -case ( Z_lt_le_dec (0 + a') (0 + n)). -simpl. -intuition. - -simpl. -intuition. - -unfold sumbool_rec. -unfold sumbool_rect. -case ( Z_lt_le_dec (a' + (n - a'))(0+ n)). -simpl. -unfold sumbool_rec. -unfold sumbool_rect. -case ( Z_lt_le_dec (n - a' + a')(0+ n) ). -simpl. -intuition. - -simpl. -intuition. - -simpl. -unfold sumbool_rec. -unfold sumbool_rect. -case (Z_lt_le_dec (n - a' + a')(0+n)). -simpl. -intuition. - -simpl. -intros H1 H2 H3. -replace (a' + (n - a') - 0)%Z with (1*n+0)%Z. -replace (n - a' + a' - 0)%Z with (1*n+0)%Z. -cut ( 0%Z = ((1%positive * n + 0) mod n)%Z). -intuition. -cut (((1%positive * n + 0) mod n)%Z =0%Z). -intuition. -replace 0%Z with (0 mod n)%Z. -apply Zmod_cancel_multiple. -exact H. -intuition. -intuition. -intuition. -Qed. - -Lemma not_inv: -forall (n k:Z)(H:(k>0)%Z)(H0:(n>0)%Z) -(a:(C_as_CMonoid k%Z n H0 (Zgt_Zge k 0 H))), -a[#](@cm_unit (C_as_CMonoid k%Z n H0 (Zgt_Zge k 0 H)))-> - Not (invertible (C_as_CMonoid k%Z n H0 (Zgt_Zge k 0 H)) a). -simpl. -unfold ZFap. -simpl. -intros n k H H0 a. -elim a. -intros a' aprf0 aprf1. -intros H1 H2. -unfold invertible in H2. -elim H2. -simpl. -unfold is_inverse. -clear H2. -simpl. -unfold ZF_rec. -unfold ZF_rect. -unfold sumbool_rec. -unfold sumbool_rect. -simpl. -intro inv. -unfold CSetoid_un_op in inv. -elim inv. -intros inv' inv_strext. -simpl. -case ( inv' (Build_ZF (k+n) a' aprf0 aprf1)). -intros i iprf0 iprf1. -case ( Z_lt_le_dec (a' + i) (k+n)). -simpl. -unfold sumbool_rec. -unfold sumbool_rect. -case (Z_lt_le_dec (i + a') (k+n)). -simpl. -intuition. - -simpl. -intuition. - -simpl. -unfold sumbool_rec. -unfold sumbool_rect. -case (Z_lt_le_dec (i + a') (k+n)). -simpl. -intuition. - -simpl. -set (H4:=(Z_mod_lt (a' +i -k) n H0)). -intuition. -Qed. - -Lemma unit_inv: -(forall (n k:Z)(H:(k>=0)%Z)(H0:(n>0)%Z), -(invertible (C_as_CMonoid k%Z n H0 H) (@cm_unit (C_as_CMonoid k%Z n H0 H)))): -CProp. -intros n k H H0. -simpl. -unfold invertible. -exists (Const_CSetoid_fun (C_as_CSetoid k n H0 H)(C_as_CSetoid k n H0 H) - (@cm_unit (C_as_CMonoid k n H0 H))). -unfold is_inverse. -simpl. -unfold sumbool_rec. -unfold sumbool_rect. -case (Z_lt_le_dec (0+0) (k + n)). -simpl. -intuition. - -simpl. -intuition. -Qed. - diff --git a/old/CQuotient_Modules.v b/old/CQuotient_Modules.v deleted file mode 100644 index f5f70322..00000000 --- a/old/CQuotient_Modules.v +++ /dev/null @@ -1,324 +0,0 @@ -(* Copyright © 1998-2006 - * Henk Barendregt - * Luís Cruz-Filipe - * Herman Geuvers - * Mariusz Giero - * Rik van Ginneken - * Dimitri Hendriks - * Sébastien Hinderer - * Bart Kirkels - * Pierre Letouzey - * Iris Loeb - * Lionel Mamane - * Milad Niqui - * Russell O’Connor - * Randy Pollack - * Nickolay V. Shmyrev - * Bas Spitters - * Dan Synek - * Freek Wiedijk - * Jan Zwanenburg - * - * This work is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This work is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this work; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) -(* CQuotient_Modules.v, v1.0, 28april2004, Bart Kirkels *) - -(** printing [+] %\ensuremath+% #+# *) -(** printing [*] %\ensuremath\times% #×# *) -(** printing ['] %\ensuremath.% #.# *) -(** printing [-] %\ensuremath{-}% #−# *) -(** printing [--] %\ensuremath-% #−# *) -(** printing [=] %\ensuremath=% #≡# *) -(** printing [#] %\ensuremath\#% *) -(** printing Zero %\ensuremath{\mathbf0}% #0# *) -(** printing One %\ensuremath{\mathbf1}% #1# *) - -Require Export CModules. - -(** -* Quotient Modules -Let [R] be a ring, [A] an [R]-Module and [cm] a comodule of [A]. %\\% -We will prove that $A / \lnot cm$ #A / ~cm# is a module, called QuotMod. -** QuotMod is a setoid -To achieve this we define a new apartness on the elements of [A]. -*) - -Section QuotMod. - -Variable R : CRing. -Variable A :RModule R. -Variable cm: comod A. - -Definition ap_quotmod (x y:A) := cm(x[-]y). - -Lemma ap_quotmod_irreflexive : irreflexive ap_quotmod. -Proof. - red in |-*. - intro x. - unfold ap_quotmod in |-*. - assert (x[-]x[=]Zero); algebra. - assert (Not ((cmpred A cm) Zero)); algebra. - intro. apply H0. - apply (comod_wd A cm (x[-]x) Zero); auto. -Qed. - -Lemma ap_quotmod_symmetric : Csymmetric ap_quotmod. -Proof. - red in |-*. - intros x y. - unfold ap_quotmod. - intro X. - apply (comod_mult A cm (y[-]x) ([--]One)). - apply (comod_wd A cm (x[-]y) (rm_mu A [--]One (y[-]x))); algebra. - astepr [--](y[-]x); try apply eq_symmetric; try apply muminus1. - astepl [--](y[+][--]x). - astepl ([--][--]x[+][--]y). - astepl (x[+][--]y). - algebra. -Qed. - -Lemma ap_quotmod_cotransitive : cotransitive ap_quotmod. -Proof. - red in |-*. - intros x y; unfold ap_quotmod. - intros X z. - apply (comod_plus A cm (x[-]z) (z[-]y)). - apply (comod_wd A cm (x[-]y) ((x[-]z)[+](z[-]y))); auto. - astepr ((x[-]z)[+]z[-]y). - astepr ((x[-]z)[+]z[+][--]y). - astepr ((x[+][--]z)[+]z[+][--]y). - astepr (x[+]([--]z[+]z)[+][--]y). - astepr (x[+]Zero[+][--]y). - astepr (x[+][--]y). - astepr (x[-]y). - apply eq_reflexive. -Qed. - -(** -We take `not apart' as the new equality. -*) - -Definition eq_quotmod (x y:A) := Not (cm(x[-]y)). - -Lemma eq_quotmod_wd : forall (x y:A), x[=]y -> (eq_quotmod x y). -Proof. - intros x y X; auto. - red in |-*; intro X0. - assert ((cmpred A cm)(Zero)); algebra. - apply (comod_wd A cm (x[-]y) Zero); algebra. - apply x_minus_x; auto. - apply (comod_nonzero A cm); assumption. -Qed. - -Lemma ap_quotmod_tight : tight_apart eq_quotmod ap_quotmod. -Proof. - red in |-*. - intros x y; intuition. -Qed. - -Definition ap_quotmod_is_apartness := -Build_is_CSetoid A eq_quotmod ap_quotmod -ap_quotmod_irreflexive -ap_quotmod_symmetric -ap_quotmod_cotransitive -ap_quotmod_tight. - -Definition quotmod_as_CSetoid := Build_CSetoid _ _ _ -ap_quotmod_is_apartness. - -(** -%\newpage% -** QuotMod is a semigroup -We use [[+]] as the operation for this. -*) - -Lemma dmplus_is_ext : bin_fun_strext quotmod_as_CSetoid -quotmod_as_CSetoid quotmod_as_CSetoid (csg_op (c:=A)). -Proof. - red in |-*. - intros x1 x2 y1 y2. - simpl in |-*. - unfold ap_quotmod in |-*. - intro X. - apply (comod_plus A cm (x1[-]x2) (y1[-]y2)); auto. - apply (comod_wd A cm ((x1[+]y1)[-](x2[+]y2)) ((x1[-]x2)[+](y1[-]y2))); auto. - astepr ((x1[+][--]x2)[+](y1[+][--]y2)). - astepr ((x1[+][--]x2)[+]y1[+][--]y2). - astepr (((x1[+][--]x2)[+]y1)[+][--]y2). - astepr ([--]y2[+]((x1[+][--]x2)[+]y1)). - astepr ([--]y2[+](x1[+][--]x2)[+]y1). - astepr ([--]y2[+]([--]x2[+]x1)[+]y1). - astepr (([--]y2[+][--]x2)[+]x1[+]y1). - astepr (([--]y2[+][--]x2)[+](x1[+]y1)). - astepr ((x1[+]y1)[+]([--]y2[+][--]x2)). - astepr ((x1[+]y1)[+][--](x2[+]y2)). - algebra. -Qed. - -Definition dmplus_is_bin_fun := -Build_CSetoid_bin_fun quotmod_as_CSetoid quotmod_as_CSetoid -quotmod_as_CSetoid (csg_op (c:=A)) dmplus_is_ext. - -Lemma dmplus_is_assoc : associative dmplus_is_bin_fun. -Proof. - red in |-*; auto. - intros x y z; simpl in |-*. - apply eq_quotmod_wd; algebra. -Qed. - -Definition quotmod_as_CSemiGroup := Build_CSemiGroup quotmod_as_CSetoid -dmplus_is_bin_fun dmplus_is_assoc. - -(** -** QuotMod ia a monoid -[Zero:A] will work as unit. -*) - -Lemma zero_as_rht_unit : is_rht_unit dmplus_is_bin_fun Zero. -Proof. - red in |-*; intro x. - simpl in |-*. - apply eq_quotmod_wd; algebra. -Qed. - -Lemma zero_as_lft_unit : is_lft_unit dmplus_is_bin_fun Zero. -Proof. - red in |-*; intro x; simpl in |-*. - apply eq_quotmod_wd; algebra. -Qed. - -Definition quotmod_is_CMonoid := Build_is_CMonoid quotmod_as_CSemiGroup -Zero zero_as_rht_unit zero_as_lft_unit. - -Definition quotmod_as_CMonoid := Build_CMonoid quotmod_as_CSemiGroup -Zero quotmod_is_CMonoid. - -(** -** QuotMod is a group -The same function still works as inverse (i.e. minus). -*) - -Lemma dminv_is_ext : un_op_strext quotmod_as_CSetoid (cg_inv (c:=A)). -Proof. - red in |-*. - red in |-*. - intros x y. - simpl in |-*. - unfold ap_quotmod in |-*. - intro X. - apply (comod_mult A cm (x[-]y) [--]One); algebra. - apply (comod_wd A cm ([--]x[-][--]y) ([--]One['](x[-]y))); algebra. - astepr ([--](x[-]y)). - astepr ([--](x[+][--]y)). - astepr ([--]x[+][--][--]y). - algebra. -Qed. - -Definition dminv_is_un_op := -Build_CSetoid_un_op quotmod_as_CSetoid (cg_inv (c:=A)) dminv_is_ext. - -Lemma dminv_is_inv : is_CGroup quotmod_as_CMonoid dminv_is_un_op. -Proof. - red in |-*. - intro x. - simpl in |-*. - unfold is_inverse in |-*. - simpl in |-*. - split; apply eq_quotmod_wd; algebra. -Qed. - -Definition quotmod_as_CGroup := Build_CGroup quotmod_as_CMonoid -dminv_is_un_op dminv_is_inv. - -(** -%\newpage% -** QuotMod is an Abelian group -*) - -Lemma dmplus_is_commutative : commutes dmplus_is_bin_fun. -Proof. - red in |-*. - intros x y. - simpl in |-*. - apply eq_quotmod_wd; algebra. -Qed. - -Definition quotmod_as_CAbGroup := Build_CAbGroup quotmod_as_CGroup -dmplus_is_commutative. - -(** -** QuotMod is an [R]-module -[rm_mu A] does the job. -*) - -Lemma dmmu_is_ext : bin_fun_strext R -quotmod_as_CAbGroup quotmod_as_CAbGroup (rm_mu A). -Proof. - red in |-*. - intros a1 a2 x1 x2. - simpl in |-*;simpl in |-*. - unfold ap_quotmod in |-*. - intro X. - cut (cm ( a1['](x1[-]x2) [+] (a1[-]a2)[']x2) ). - intro. - assert ( cm (a1['](x1[-]x2)) or cm ((a1[-]a2)[']x2) ). - algebra. - elim X1;intros. - right. - apply (comod_mult A cm (x1[-]x2) a1); assumption. - left. - cut ( (a1[-]a2)[']x2 [#] Zero). - intro X2; cut ((a1[-]a2)[#]Zero); algebra. - apply (mu_axap0_aap0 R A (a1[-]a2) x2); assumption. - apply (comod_apzero A cm); assumption. - apply (comod_wd A cm (a1[']x1 [-] a2[']x2) ); try assumption. - astepr ( a1['](x1[+][--]x2) [+] (a1[-]a2)[']x2). - astepr ((a1['](x1[+][--]x2))[+]((a1[+][--]a2)[']x2)). - astepr ((a1['](x1[+][--]x2))[+](a1[']x2 [+] [--]a2[']x2)). - astepr ((a1[']x2 [+] [--]a2[']x2) [+] (a1['](x1[+][--]x2))). - astepr (a1[']x2 [+] [--]a2[']x2 [+] (a1['](x1[+][--]x2))). - astepr ((a1[']x2) [+] ([--]a2[']x2) [+] (a1['](x1[+][--]x2))). - simpl in |-*. - astepr (a1[']x2 [+] [--]a2[']x2 [+] a1[']x1 [+] a1['][--]x2); simpl in |-*. - astepr ((a1[']x2 [+] [--]a2[']x2 [+] a1[']x1) [+] a1['][--]x2); simpl in |-*. - astepr ((a1[']x2 [+] [--]a2[']x2 [+] a1[']x1) [+] [--](a1[']x2)). - astepr ([--](a1[']x2) [+] (a1[']x2 [+] [--]a2[']x2 [+] a1[']x1)). - astepr ([--](a1[']x2) [+] (a1[']x2 [+] ([--]a2[']x2 [+] a1[']x1))). - astepr (([--](a1[']x2) [+] a1[']x2) [+] ([--]a2[']x2 [+] a1[']x1)). - astepr (Zero [+] ([--]a2[']x2 [+] a1[']x1)). - astepr ([--]a2[']x2 [+] a1[']x1). - astepr (a1[']x1 [+] [--]a2[']x2). - astepr (a1[']x1 [+] [--](a2[']x2)). - Step_final (a1[']x1 [-] a2[']x2). - astepl ((a1[']x2 [+] [--]a2[']x2) [+] (a1[']x1 [+] a1['][--]x2)). - apply plus_resp_eq; algebra. -Qed. - -Definition dmmu_is_bin_fun := -Build_CSetoid_bin_fun R quotmod_as_CAbGroup -quotmod_as_CAbGroup (rm_mu A) dmmu_is_ext. - -Lemma quotmod_is_RModule : is_RModule quotmod_as_CAbGroup -dmmu_is_bin_fun. -Proof. - apply Build_is_RModule; intuition; simpl in |-*; apply eq_quotmod_wd; algebra. -Qed. - -Definition quotmod_as_RModule := Build_RModule R quotmod_as_CAbGroup -dmmu_is_bin_fun quotmod_is_RModule. - -End QuotMod. - -Implicit Arguments quotmod_as_RModule [R]. diff --git a/old/CQuotient_Rings.v b/old/CQuotient_Rings.v deleted file mode 100644 index e5c47454..00000000 --- a/old/CQuotient_Rings.v +++ /dev/null @@ -1,343 +0,0 @@ -(* Copyright © 1998-2006 - * Henk Barendregt - * Luís Cruz-Filipe - * Herman Geuvers - * Mariusz Giero - * Rik van Ginneken - * Dimitri Hendriks - * Sébastien Hinderer - * Bart Kirkels - * Pierre Letouzey - * Iris Loeb - * Lionel Mamane - * Milad Niqui - * Russell O’Connor - * Randy Pollack - * Nickolay V. Shmyrev - * Bas Spitters - * Dan Synek - * Freek Wiedijk - * Jan Zwanenburg - * - * This work is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This work is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this work; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) -(* CQuotient_Rings.v, v1.0, 28april2004, Bart Kirkels *) - -(** printing [+] %\ensuremath+% #+# *) -(** printing [*] %\ensuremath\times% #×# *) -(** printing ['] %\ensuremath.% #.# *) -(** printing [-] %\ensuremath{-}% #−# *) -(** printing [--] %\ensuremath-% #−# *) -(** printing [=] %\ensuremath=% #≡# *) -(** printing [#] %\ensuremath\#% *) -(** printing Zero %\ensuremath{\mathbf0}% #0# *) -(** printing One %\ensuremath{\mathbf1}% #1# *) - -Require Export CIdeals. - -(** -* Quotient Rings -Let [R] be a ring and [C] a coideal of [R].%\\% -We will prove that $A / \lnot C$ #A / ~C# is a ring, called QuotRing. -** QuotRing is a setoid -To achieve this we define a new apartness on the elements of [R]. -*) - -Section QuotRing. - -Variable R : CRing. -Variable C : coideal R. - -Definition ap_quotring (x y:R) := C(x[-]y). - -Lemma ap_quotring_irreflexive : irreflexive ap_quotring. -Proof. - red in |-*. - intro x. - unfold ap_quotring in |-*. - assert (x[-]x[=]Zero); algebra. - assert (Not ((cipred R C) Zero)); algebra. - intro. apply H0. - apply (coideal_wd R C (x[-]x) Zero); auto. -Qed. - -Lemma ap_quotring_symmetric : Csymmetric ap_quotring. -Proof. - red in |-*. - intros x y. - unfold ap_quotring. - intro X. - cut (C [--]One and C (y[-]x)). intuition. - apply (coideal_mult R C [--]One (y[-]x)). - apply (coideal_wd R C (x[-]y) ([--]One[*](y[-]x))); algebra. - astepr [--](y[-]x). - astepr [--](y[+][--]x). - astepr ([--][--]x[+][--]y). - Step_final (x[+][--]y). -Qed. - -Lemma ap_quotring_cotransitive : cotransitive ap_quotring. -Proof. - red in |-*. - intros x y; unfold ap_quotring. - intros X z. - apply (coideal_plus R C (x[-]z) (z[-]y)). - apply (coideal_wd R C (x[-]y) ((x[-]z)[+](z[-]y))); auto. - astepr ((x[-]z)[+]z[-]y). - astepr ((x[-]z)[+]z[+][--]y). - astepr ((x[+][--]z)[+]z[+][--]y). - astepr (x[+]([--]z[+]z)[+][--]y). - astepr (x[+]Zero[+][--]y). - astepr (x[+][--]y). - astepr (x[-]y). - apply eq_reflexive. -Qed. - -(** -We take `not apart' as the new equality. -*) - -Definition eq_quotring (x y:R) := Not (C(x[-]y)). - -Lemma eq_quotring_wd : forall (x y:R), x[=]y -> (eq_quotring x y). -Proof. - intros x y X; auto. - red in |-*; intro X0. - assert ((cipred R C)(Zero)); algebra. - apply (coideal_wd R C (x[-]y) Zero); algebra. - apply x_minus_x; auto. - apply (coideal_nonzero R C); assumption. -Qed. - -Lemma ap_quotring_tight : tight_apart eq_quotring ap_quotring. -Proof. - red in |-*. - intros x y; intuition. -Qed. - -Definition ap_quotring_is_apartness := -Build_is_CSetoid R eq_quotring ap_quotring -ap_quotring_irreflexive -ap_quotring_symmetric -ap_quotring_cotransitive -ap_quotring_tight. - -Definition quotring_as_CSetoid := Build_CSetoid _ _ _ -ap_quotring_is_apartness. - -(** -%\newpage% -** QuotRing is a semigroup -We use [[+]] as the operation for this. -*) - -Lemma drplus_is_ext : bin_fun_strext quotring_as_CSetoid -quotring_as_CSetoid quotring_as_CSetoid (csg_op (c:=R)). -Proof. - red in |-*. - intros x1 x2 y1 y2. - simpl in |-*. - unfold ap_quotring in |-*. - intro X. - apply (coideal_plus R C (x1[-]x2) (y1[-]y2)); auto. - apply (coideal_wd R C ((x1[+]y1)[-](x2[+]y2)) ((x1[-]x2)[+](y1[-]y2))); auto. - astepr ((x1[+][--]x2)[+](y1[+][--]y2)). - astepr ((x1[+][--]x2)[+]y1[+][--]y2). - astepr (((x1[+][--]x2)[+]y1)[+][--]y2). - astepr ([--]y2[+]((x1[+][--]x2)[+]y1)). - astepr ([--]y2[+](x1[+][--]x2)[+]y1). - astepr ([--]y2[+]([--]x2[+]x1)[+]y1). - astepr (([--]y2[+][--]x2)[+]x1[+]y1). - astepr (([--]y2[+][--]x2)[+](x1[+]y1)). - astepr ((x1[+]y1)[+]([--]y2[+][--]x2)). - astepr ((x1[+]y1)[+][--](x2[+]y2)). - algebra. -Qed. - -Definition drplus_is_bin_fun := -Build_CSetoid_bin_fun quotring_as_CSetoid quotring_as_CSetoid -quotring_as_CSetoid (csg_op (c:=R)) drplus_is_ext. - -Lemma drplus_is_assoc : associative drplus_is_bin_fun. -Proof. - red in |-*; auto. - intros x y z; simpl in |-*. - apply eq_quotring_wd; algebra. -Qed. - -Definition quotring_as_CSemiGroup := Build_CSemiGroup quotring_as_CSetoid -drplus_is_bin_fun drplus_is_assoc. - -(** -** QuotRing is a monoid -[Zero:R] will work as unit. -*) - -Lemma zero_as_rht_unit : is_rht_unit drplus_is_bin_fun Zero. -Proof. - red in |-*; intro x. - simpl in |-*. - apply eq_quotring_wd; algebra. -Qed. - -Lemma zero_as_lft_unit : is_lft_unit drplus_is_bin_fun Zero. -Proof. - red in |-*; intro x; simpl in |-*. - apply eq_quotring_wd; algebra. -Qed. - -Definition quotring_is_CMonoid := Build_is_CMonoid quotring_as_CSemiGroup -Zero zero_as_rht_unit zero_as_lft_unit. - -Definition quotring_as_CMonoid := Build_CMonoid quotring_as_CSemiGroup -Zero quotring_is_CMonoid. - -(** -** QuotRing is a group -The same function still works as inverse (i.e. minus). -*) - -Lemma drinv_is_ext : un_op_strext quotring_as_CSetoid (cg_inv (c:=R)). -Proof. - red in |-*. - red in |-*. - intros x y. - simpl in |-*. - unfold ap_quotring in |-*. - intro X. - cut (C (x[-]y) and C [--]One). intuition. - apply (coideal_mult R C (x[-]y) [--]One); algebra. - apply (coideal_wd R C ([--]One[*](x[-]y)) ((x[-]y)[*][--]One)); algebra. - apply (coideal_wd R C ([--]x[-][--]y) ([--]One[*](x[-]y))); algebra. - astepr ([--](x[-]y)). - astepr ([--](x[+][--]y)). - Step_final ([--]x[+][--][--]y). -Qed. - -Definition drinv_is_un_op := -Build_CSetoid_un_op quotring_as_CSetoid (cg_inv (c:=R)) drinv_is_ext. - -Lemma drinv_is_inv : is_CGroup quotring_as_CMonoid drinv_is_un_op. -Proof. - red in |-*. - intro x. - simpl in |-*. - unfold is_inverse in |-*. - simpl in |-*. - split; apply eq_quotring_wd; algebra. -Qed. - -Definition quotring_as_CGroup := Build_CGroup quotring_as_CMonoid -drinv_is_un_op drinv_is_inv. - -(** -%\newpage% -** QuotRing is an Abelian group -*) - -Lemma drplus_is_commutative : commutes drplus_is_bin_fun. -Proof. - red in |-*. - intros x y. - simpl in |-*. - apply eq_quotring_wd; algebra. -Qed. - -Definition quotring_as_CAbGroup := Build_CAbGroup quotring_as_CGroup -drplus_is_commutative. - -(** -** QuotRing is a ring -Multiplication from [R] still works as a multiplicative function, making -quotring a ring. -*) - -Lemma drmult_is_ext : bin_fun_strext quotring_as_CAbGroup -quotring_as_CAbGroup quotring_as_CAbGroup (cr_mult (c:=R)). -Proof. - red in |-*. - intros x1 x2 y1 y2. - simpl in |-*. - unfold ap_quotring. - intro X. - cut (C ((x1[*](y1[-]y2)) [+] ((x1[-]x2)[*]y2))). - intro. - assert (C (x1[*](y1[-]y2)) or C ((x1[-]x2)[*]y2)); algebra. - elim X1; intros. - right. cut (C x1 and C (y1[-]y2)). intuition. - apply coideal_mult; assumption. - left. cut (C (x1[-]x2) and C y2). intuition. - apply coideal_mult; assumption. - apply (coideal_wd R C (x1[*]y1 [-] x2[*]y2)); try assumption. - astepr (x1[*]y1 [-] x1[*]y2 [+] (x1[-]x2)[*]y2). - astepr (x1[*]y1 [-] x1[*]y2 [+] x1[*]y2 [-] x2[*]y2). - astepr (x1[*]y1 [+] [--](x1[*]y2) [+] x1[*]y2 [+] [--](x2[*]y2)). - astepr ((x1[*]y1 [+] ([--](x1[*]y2) [+] x1[*]y2)) [+] [--](x2[*]y2)). - astepr ((x1[*]y1 [+] Zero) [+] [--](x2[*]y2)). - Step_final (x1[*]y1 [+] [--](x2[*]y2)). - astepl ((x1[*]y1 [-] x1[*]y2)[+](x1[*]y2)[+][--](x2[*]y2)). - astepl ((x1[*]y1 [-] x1[*]y2)[+](x1[*]y2[+][--](x2[*]y2))). - apply plus_resp_eq. - apply eq_symmetric; apply (ring_distr2 R x1 x2 y2). - astepl ((x1[-]x2)[*]y2 [+] (x1[*]y1 [-] x1[*]y2)). - astepr ((x1[-]x2)[*]y2 [+] x1[*](y1[-]y2)). - apply plus_resp_eq. - apply eq_symmetric; apply (ring_distr1 R x1 y1 y2). -Qed. - -Definition drmult_is_bin_op := -Build_CSetoid_bin_op quotring_as_CAbGroup (cr_mult (c:=R)) drmult_is_ext. - -Lemma drmult_associative : associative drmult_is_bin_op. -Proof. - red in |-*; simpl in |-*. - intros x y z; apply eq_quotring_wd. - algebra. -Qed. - -Lemma drmult_monoid : is_CMonoid (Build_CSemiGroup quotring_as_CAbGroup - drmult_is_bin_op drmult_associative) One. - apply Build_is_CMonoid; red in |-*; intro x; simpl in |-*; apply eq_quotring_wd; algebra. -Qed. - -Lemma drmult_commutes : commutes drmult_is_bin_op. -Proof. - red in |-*; simpl in |-*; intros x y; apply eq_quotring_wd; algebra. -Qed. - -Lemma quotring_distr : distributive drmult_is_bin_op drplus_is_bin_fun. -Proof. - red in |-*; simpl in |-*; intros x y z. - apply eq_quotring_wd; algebra. -Qed. - -Lemma quotring_nontriv : (One:quotring_as_CAbGroup) [#] (Zero:quotring_as_CAbGroup). -Proof. - simpl in |-*. - unfold ap_quotring. - apply (coideal_wd R C One (One[-]Zero)); algebra. -Qed. - -Definition quotring_is_CRing := Build_is_CRing quotring_as_CAbGroup One -drmult_is_bin_op drmult_associative drmult_monoid -drmult_commutes quotring_distr quotring_nontriv. - -Definition quotring_as_CRing := Build_CRing quotring_as_CAbGroup -One drmult_is_bin_op quotring_is_CRing. - -End QuotRing. - - - diff --git a/old/CVectorSpace.v b/old/CVectorSpace.v deleted file mode 100644 index 40cfcedb..00000000 --- a/old/CVectorSpace.v +++ /dev/null @@ -1,174 +0,0 @@ -(* Copyright © 1998-2006 - * Henk Barendregt - * Luís Cruz-Filipe - * Herman Geuvers - * Mariusz Giero - * Rik van Ginneken - * Dimitri Hendriks - * Sébastien Hinderer - * Bart Kirkels - * Pierre Letouzey - * Iris Loeb - * Lionel Mamane - * Milad Niqui - * Russell O’Connor - * Randy Pollack - * Nickolay V. Shmyrev - * Bas Spitters - * Dan Synek - * Freek Wiedijk - * Jan Zwanenburg - * - * This work is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This work is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this work; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -(** printing ['] %{'}% #'# *) - -Require Export CFields. - -(** -* Vector Spaces - -Obsolete but maintained. -*) - -(* begin hide *) -Set Implicit Arguments. -Unset Strict Implicit. -(* end hide *) - -Record VSpace (F : CField) : Type := - {vs_vs :> CGroup; - vs_op : CSetoid_outer_op F vs_vs; - vs_assoc : forall a b v, vs_op (a[*]b) v [=] vs_op a (vs_op b v); - vs_unit : forall v, vs_op One v [=] v; - vs_distl : forall a b v, vs_op (a[+]b) v [=] vs_op a v[+]vs_op b v; - vs_distr : forall a v u, vs_op a (v[+]u) [=] vs_op a v[+]vs_op a u}. - -(* begin hide *) -Set Strict Implicit. -Unset Implicit Arguments. -(* end hide *) - -Hint Resolve vs_assoc vs_unit vs_distl vs_distr: algebra. - -Implicit Arguments vs_op [F v]. -Infix "[']" := vs_op (at level 30, no associativity). - -(** -%\begin{convention}% -Let [F] be a fiels and let [V] be a vector space over [F] -%\end{convention}% -*) - -Section VS_basics. -Variable F : CField. -Variable V : VSpace F. - -Lemma vs_op_zero : forall a : F, a['] (Zero:V) [=] Zero. -Proof. - intros. - apply cg_cancel_lft with (a['] (Zero:V)). - astepl (a['] ((Zero:V) [+]Zero)). - Step_final (a['] (Zero:V)). -Qed. - -Lemma zero_vs_op : forall v : V, Zero[']v [=] Zero. -Proof. - intros. - apply cg_cancel_lft with (Zero[']v). - astepl ((Zero[+]Zero) [']v). - Step_final (Zero[']v). -Qed. - -Hint Resolve vs_op_zero zero_vs_op: algebra. - -Lemma vs_op_inv_V : forall (x : F) (y : V), x['][--]y [=] [--] (x[']y). -Proof. - intros. - apply cg_inv_unique. - astepl (x['] (y[+][--]y)). - Step_final (x['] (Zero:V)). -Qed. - -Lemma vs_op_inv_S : forall (x : F) (y : V), [--]x[']y [=] [--] (x[']y). -Proof. - intros. - apply cg_inv_unique. - astepl ((x[+][--]x) [']y). - Step_final (Zero[']y). -Qed. - -Hint Resolve vs_op_inv_V vs_op_inv_S: algebra. - -Lemma vs_inv_assoc : forall (a : F) a_ (v : V), v [=] f_rcpcl a a_['] (a[']v). -Proof. - intros. - astepl (One[']v). - Step_final ((f_rcpcl a a_[*]a) [']v). -Qed. -Hint Resolve vs_inv_assoc: algebra. - - -Lemma ap_zero_vs_op_l : forall (a : F) (v : V), a[']v [#] Zero -> a [#] Zero. -Proof. - intros. - elim (csoo_strext _ _ (vs_op (F:=F) (v:=V)) a Zero v v). - auto. - intro contra; elim (ap_irreflexive _ _ contra). - astepr (Zero:V). auto. -Qed. - -Lemma ap_zero_vs_op_r : forall (a : F) (v : V), a[']v [#] Zero -> v [#] Zero. -Proof. - intros. - elim (csoo_strext _ _ (vs_op (F:=F) (v:=V)) a a v Zero). - intro contra; elim (ap_irreflexive _ _ contra). - auto. - astepr (Zero:V). auto. -Qed. - -(* note this is the same proof as mult_resp_ap_zero *) -Lemma vs_op_resp_ap_rht : forall (a : F) (v u : V), a [#] Zero -> v [#] u -> a[']v [#] a[']u. -Proof. - intros. - cut (f_rcpcl a X['] (a[']v) [#] f_rcpcl a X['] (a[']u)). - intros H1. - case (csoo_strext _ _ _ _ _ _ _ H1). - intro contra; elim (ap_irreflexive _ _ contra). - auto. - astepr u. - astepl v. auto. -Qed. - -Lemma vs_op_resp_ap_zero : forall (a : F) (v : V), a [#] Zero -> v [#] Zero -> a[']v [#] Zero. -Proof. - intros. - astepr (a['] (Zero:V)). - apply vs_op_resp_ap_rht; assumption. -Qed. - -Lemma vs_op_resp_ap_lft : forall (a b : F) (v : V), a [#] b -> v [#] Zero -> a[']v [#] b[']v. -Proof. - intros. - apply zero_minus_apart. - astepl ((a[-]b) [']v). - apply vs_op_resp_ap_zero; [ idtac | assumption ]. - apply minus_ap_zero; assumption. - unfold cg_minus in |- *. Step_final (a[']v[+][--]b[']v). -Qed. - -End VS_basics. -Hint Resolve vs_op_zero zero_vs_op: algebra. diff --git a/old/N_no_group.v b/old/N_no_group.v deleted file mode 100644 index fc3cb6bc..00000000 --- a/old/N_no_group.v +++ /dev/null @@ -1,76 +0,0 @@ -(* Copyright © 1998-2006 - * Henk Barendregt - * Luís Cruz-Filipe - * Herman Geuvers - * Mariusz Giero - * Rik van Ginneken - * Dimitri Hendriks - * Sébastien Hinderer - * Bart Kirkels - * Pierre Letouzey - * Iris Loeb - * Lionel Mamane - * Milad Niqui - * Russell O’Connor - * Randy Pollack - * Nickolay V. Shmyrev - * Bas Spitters - * Dan Synek - * Freek Wiedijk - * Jan Zwanenburg - * - * This work is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This work is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this work; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - - -Require Export Nmonoid. -Require Import CGroups. - -(** -** Non-example of a group: $\langle$#⟨#[nat],[[+]]$\rangle$#⟩# -There is no inverse function for the natural numbers with addition. -*) - -Lemma no_inverse_nat_plus : forall inv : CSetoid_un_op nat_as_CSetoid, - ~ is_inverse (csg_op (c:=nat_as_CSemiGroup)) 0 2 (inv 2). -Proof. - simpl in |- *. - unfold plus_is_bin_fun in |- *. - intro inv. - case inv. - unfold is_inverse in |- *. - simpl in |- *. - intros a1 a2. - generalize no_inverse0. - simpl in |- *. - intuition. -Qed. - -(** Hence they do not form a CGroup. -*) - -Lemma no_group_nat_plus : forall inv : CSetoid_un_op nat_as_CMonoid, - ~ is_CGroup nat_as_CMonoid inv. -Proof. - simpl in |- *. - intro inv. - red in |- *. - unfold is_CGroup in |- *. - intro H. - set (H0 := H 2) in *. - set (H1 := no_inverse_nat_plus inv) in *. - apply H1. - exact H0. -Qed. diff --git a/old/Npos_no_group.v b/old/Npos_no_group.v deleted file mode 100644 index c0d3a839..00000000 --- a/old/Npos_no_group.v +++ /dev/null @@ -1,77 +0,0 @@ -(* Copyright © 1998-2006 - * Henk Barendregt - * Luís Cruz-Filipe - * Herman Geuvers - * Mariusz Giero - * Rik van Ginneken - * Dimitri Hendriks - * Sébastien Hinderer - * Bart Kirkels - * Pierre Letouzey - * Iris Loeb - * Lionel Mamane - * Milad Niqui - * Russell O’Connor - * Randy Pollack - * Nickolay V. Shmyrev - * Bas Spitters - * Dan Synek - * Freek Wiedijk - * Jan Zwanenburg - * - * This work is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This work is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this work; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - - -Require Import CGroups. -Require Export Nposmonoid. - -(** -** Non-example of a group: $\langle$#⟨#[Npos],[[+]]$\rangle$#⟩# -There is no inverse for multiplication on the positive natural numbers. -*) - -Lemma no_inverse_Nposmult : forall inv : CSetoid_un_op Npos, - ~ is_inverse Npos_mult ONEpos TWOpos (inv TWOpos). -Proof. - intro inv. - red in |- *. - unfold is_inverse in |- *. - intro H. - elim H. - clear H. - intros H1 H2. - clear H2. - set (H3 := no_inverse_Nposmult1) in *. - elim (H3 (inv TWOpos)). - exact H1. -Qed. - -(** Hence the natural numbers with multiplication do not form a group. -*) - -Lemma no_group_Nposmult : forall inv : CSetoid_un_op Nposmult_as_CMonoid, - ~ is_CGroup Nposmult_as_CMonoid inv. -Proof. - simpl in |- *. - intro inv. - red in |- *. - unfold is_CGroup in |- *. - intro H. - set (H0 := H (Build_subcsetoid_crr nat_as_CSetoid (fun n : nat => n <> 0) 2 (S_O 1))) in *. - set (H1 := no_inverse_Nposmult inv) in *. - apply H1. - exact H0. -Qed. diff --git a/old/Npos_no_monoid.v b/old/Npos_no_monoid.v deleted file mode 100644 index 626f71b2..00000000 --- a/old/Npos_no_monoid.v +++ /dev/null @@ -1,68 +0,0 @@ -(* Copyright © 1998-2006 - * Henk Barendregt - * Luís Cruz-Filipe - * Herman Geuvers - * Mariusz Giero - * Rik van Ginneken - * Dimitri Hendriks - * Sébastien Hinderer - * Bart Kirkels - * Pierre Letouzey - * Iris Loeb - * Lionel Mamane - * Milad Niqui - * Russell O’Connor - * Randy Pollack - * Nickolay V. Shmyrev - * Bas Spitters - * Dan Synek - * Freek Wiedijk - * Jan Zwanenburg - * - * This work is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This work is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this work; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - - -Require Export Npossemigroup. -Require Import CMonoids. - -(** -** Non-example of a monoid: $\langle$#⟨#[Npos],[[+]]$\rangle$#⟩# -There is no right unit for the addition on the positive natural numbers. -*) - -Lemma no_rht_unit_Npos : forall y : Npos, ~ is_rht_unit (S:=Npos) Npos_plus y. -Proof. - unfold is_rht_unit in |- *. - intro y. - case y. - intros scs_elem scs_prf. - apply no_rht_unit_Npos1. -Qed. - -(** Therefore the set of positive natural numbers doesn't form a group with -addition. -*) - -Lemma no_monoid_Npos : forall y : Npos, ~ is_CMonoid Npos_as_CSemiGroup y. -Proof. - intro y. - red in |- *. - intro H. - set (H0 := no_rht_unit_Npos y) in *. - apply H0. - apply (runit Npos_as_CSemiGroup). - exact H. -Qed. diff --git a/old/Transparent_algebra.v b/old/Transparent_algebra.v deleted file mode 100644 index 3f917127..00000000 --- a/old/Transparent_algebra.v +++ /dev/null @@ -1,60 +0,0 @@ -(* Copyright © 1998-2006 - * Henk Barendregt - * Luís Cruz-Filipe - * Herman Geuvers - * Mariusz Giero - * Rik van Ginneken - * Dimitri Hendriks - * Sébastien Hinderer - * Bart Kirkels - * Pierre Letouzey - * Iris Loeb - * Lionel Mamane - * Milad Niqui - * Russell O’Connor - * Randy Pollack - * Nickolay V. Shmyrev - * Bas Spitters - * Dan Synek - * Freek Wiedijk - * Jan Zwanenburg - * - * This work is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This work is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this work; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -Transparent cs_crr. -Transparent csg_crr. -Transparent cm_crr. -Transparent cg_crr. -Transparent cr_crr. -Transparent cf_crr. - -Transparent csf_fun. -Transparent csbf_fun. -Transparent csr_rel. - -Transparent cs_eq. -Transparent cs_neq. -Transparent cs_ap. -Transparent cm_unit. -Transparent csg_op. -Transparent cg_inv. -Transparent cg_minus. -Transparent cr_one. -Transparent cr_mult. - -Transparent nexp_op. -Transparent cf_div. - diff --git a/old/twoelemmonoid.v b/old/twoelemmonoid.v deleted file mode 100644 index 686914bf..00000000 --- a/old/twoelemmonoid.v +++ /dev/null @@ -1,252 +0,0 @@ -(* Copyright © 1998-2006 - * Henk Barendregt - * Luís Cruz-Filipe - * Herman Geuvers - * Mariusz Giero - * Rik van Ginneken - * Dimitri Hendriks - * Sébastien Hinderer - * Bart Kirkels - * Pierre Letouzey - * Iris Loeb - * Lionel Mamane - * Milad Niqui - * Russell O’Connor - * Randy Pollack - * Nickolay V. Shmyrev - * Bas Spitters - * Dan Synek - * Freek Wiedijk - * Jan Zwanenburg - * - * This work is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This work is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this work; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -Require Export CMonoids. -Require Export twoelemsemigroup. -Require Export Nm_to_cycm. - -Section p68E1b1. - -(** -** Example of a monoid: monoids with two elements -*) - -Definition M1_is_CMonoid:(is_CMonoid M1_as_CSemiGroup e1):= -(Build_is_CMonoid M1_as_CSemiGroup e1 e1_is_rht_unit e1_is_lft_unit). - -Definition M1_as_CMonoid:CMonoid:= -(Build_CMonoid M1_as_CSemiGroup e1 M1_is_CMonoid). - -Definition M2_is_CMonoid := -(Build_is_CMonoid M2_as_CSemiGroup e1 e1_is_rht_unit_M2 e1_is_lft_unit_M2). - -Definition M2_as_CMonoid:CMonoid:= -(Build_CMonoid M2_as_CSemiGroup e1 M2_is_CMonoid). - -Lemma two_element_CMonoids: -forall (op :(CSetoid_bin_fun M1_as_CSetoid M1_as_CSetoid M1_as_CSetoid)) -(H: (is_CSemiGroup M1_as_CSetoid op)), -(is_unit (Build_CSemiGroup M1_as_CSetoid op H) e1)-> -(forall (x y:M1_as_CSetoid),(op x y)= (M1_mult_as_bin_fun x y)) or -(forall (x y:M1_as_CSetoid), (op x y)= (M2_mult_as_bin_fun x y)). -Proof. - intros op H unit0. - cut (((op u u)=e1) or ((op u u)= u)). - intro H0. - unfold is_unit in unit0. - simpl in unit0. - elim H0. - clear H0. - intro H0. - left. - simpl. - intros x y. - unfold M1_CS_mult. - case x. - case y. - simpl. - set (unit1:= (unit0 e1)). - unfold M1_eq in unit1. - intuition. - simpl. - set (unit1:= (unit0 u)). - unfold M1_eq in unit1. - intuition. - case y. - simpl. - set (unit1:= (unit0 u)). - unfold M1_eq in unit1. - intuition. - simpl. - exact H0. - clear H0. - intro H0. - right. - simpl. - intros x y. - unfold M1_CS_mult. - case x. - case y. - simpl. - set (unit1:= (unit0 e1)). - unfold M1_eq in unit1. - intuition. - simpl. - set (unit1:= (unit0 u)). - unfold M1_eq in unit1. - intuition. - case y. - simpl. - set (unit1:= (unit0 u)). - unfold M1_eq in unit1. - intuition. - simpl. - exact H0. - apply (M1_eq_dec (op u u)). -Qed. - -End p68E1b1. - -Section p69E1. - -Let PM1M2:=(direct_product_as_CMonoid M1_as_CMonoid M2_as_CMonoid). - -Let uu: PM1M2. -Proof. - simpl. - exact (pairT u u). -Defined. - -Let e1u: PM1M2. -Proof. - simpl. - exact (pairT e1 u). -Defined. - -Lemma ex_69 : uu [+] uu [=]e1u. -Proof. - simpl. - unfold M1_eq. - intuition. -Qed. - -End p69E1. - -Section p71E1_. - -Lemma M1_is_generated_by_u: (forall(m:M1_as_CMonoid), - {n:nat | (@power_CMonoid M1_as_CMonoid u n)[=]m}):CProp. -Proof. - simpl. - intro m. - induction m. - exists 0. - simpl. - set (H:= (eq_reflexive M1_as_CSetoid e1)). - intuition. - exists 1. - simpl. - set (H:= (eq_reflexive M1_as_CSetoid u)). - intuition. -Qed. - -Lemma not_injective_f: - Not(injective (f_as_CSetoid_fun M1_as_CMonoid u M1_is_generated_by_u)). -Proof. - red. - unfold injective. - simpl. - intro H. - set (H3:=(H 0 2)). - cut (0 {#N} 2). - intro H4. - set (H5:= (H3 H4)). - set (H6:=(ap_imp_neq _ (@power_CMonoid M1_as_CMonoid u 0) (@power_CMonoid M1_as_CMonoid u 2) H5)). - unfold cs_neq in H6. - simpl in H6. - apply H6. - set (H7:= (eq_reflexive_unfolded M1_as_CMonoid e1)). - intuition. - unfold ap_nat. - unfold CNot. - intro H4. - cut False. - intuition. - intuition. -Qed. - -End p71E1_. - -Section p71E2b1. - -Lemma not_isomorphic_M1_M2: Not (isomorphic M1_as_CMonoid M2_as_CMonoid). -Proof. - unfold Not. - unfold isomorphic. - simpl. - unfold isomorphism. - unfold morphism. - simpl. - intro H. - elim H. - clear H. - intros f H. - elim H. - clear H. - intros H H0. - elim H. - clear H. - intros H H2. - unfold bijective in H0. - elim H0. - clear H0. - intros H0 H3. - unfold surjective in H3. - simpl in H3. - elim (H3 u). - intros x H4. - cut (M1_eq (f u) u). - intros H5. - set (H1:= not_M1_eq_e1_u). - unfold Not in H1. - apply H1. - unfold M1_eq in H, H2, H5 |- *. - set (H6:=(H2 u u)). - simpl in H6. - rewrite -> H in H6. - rewrite -> H5 in H6. - simpl in H6. - exact H6. - unfold M1_eq in H, H4 |- *. - set (H1:= (M1_eq_dec x)). - unfold M1_eq in H1. - elim H1. - intro H5. - rewrite H5 in H4. - rewrite H4 in H. - set (H6:= not_M1_eq_e1_u). - unfold Not in H6. - unfold M1_eq in H6. - elim H6. - cut (u=e1). - intuition. - exact H. - intro H5. - rewrite H5 in H4. - exact H4. -Qed. - -End p71E2b1. diff --git a/old/twoelemsemigroup.v b/old/twoelemsemigroup.v deleted file mode 100644 index ccdfb0c8..00000000 --- a/old/twoelemsemigroup.v +++ /dev/null @@ -1,171 +0,0 @@ -(* Copyright © 1998-2006 - * Henk Barendregt - * Luís Cruz-Filipe - * Herman Geuvers - * Mariusz Giero - * Rik van Ginneken - * Dimitri Hendriks - * Sébastien Hinderer - * Bart Kirkels - * Pierre Letouzey - * Iris Loeb - * Lionel Mamane - * Milad Niqui - * Russell O’Connor - * Randy Pollack - * Nickolay V. Shmyrev - * Bas Spitters - * Dan Synek - * Freek Wiedijk - * Jan Zwanenburg - * - * This work is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This work is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this work; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -Require Export CSemiGroups. -Require Export twoelemsetoid. - -Section p68E1b1. - -(** -** Example of a semigroup: semigroups with two elements -*) - -Lemma M1_is_CSemiGroup:(is_CSemiGroup M1_as_CSetoid M1_mult_as_bin_fun). -Proof. - unfold is_CSemiGroup. - unfold associative. - simpl. - unfold M1_CS_mult. - intros x y z. - case x. - case y. - case z. - simpl. - unfold M1_eq. - reflexivity. - simpl. - unfold M1_eq. - reflexivity. - case z. - simpl. - unfold M1_eq. - reflexivity. - simpl. - unfold M1_eq. - reflexivity. - case y. - case z. - simpl. - unfold M1_eq. - reflexivity. - simpl. - unfold M1_eq. - reflexivity. - case z. - simpl. - unfold M1_eq. - reflexivity. - simpl. - unfold M1_eq. - reflexivity. -Qed. - -Lemma e1_is_lft_unit: (is_lft_unit M1_mult_as_bin_fun e1). -Proof. - unfold is_lft_unit. - simpl. - unfold M1_eq. - reflexivity. -Qed. - -Lemma e1_is_rht_unit:(is_rht_unit M1_mult_as_bin_fun e1). -Proof. - unfold is_rht_unit. - simpl. - unfold M1_eq. - unfold M1_CS_mult. - intro x. - case x. - simpl. - reflexivity. - simpl. - reflexivity. -Qed. - -Definition M1_as_CSemiGroup:CSemiGroup:= -(Build_CSemiGroup M1_as_CSetoid M1_mult_as_bin_fun M1_is_CSemiGroup). - -Lemma M2_is_CSemiGroup:(is_CSemiGroup M1_as_CSetoid M2_mult_as_bin_fun). -Proof. - unfold is_CSemiGroup. - unfold associative. - simpl. - intros x y z. - case x. - case y. - case z. - simpl. - unfold M1_eq. - reflexivity. - simpl. - unfold M1_eq. - reflexivity. - case z. - simpl. - unfold M1_eq. - reflexivity. - simpl. - unfold M1_eq. - reflexivity. - case y. - case z. - simpl. - unfold M1_eq. - reflexivity. - simpl. - unfold M1_eq. - reflexivity. - simpl. - unfold M1_eq. - reflexivity. -Qed. - -Definition M2_as_CSemiGroup:= -(Build_CSemiGroup M1_as_CSetoid M2_mult_as_bin_fun M2_is_CSemiGroup). - -Lemma e1_is_lft_unit_M2: (is_lft_unit M2_mult_as_bin_fun e1). -Proof. - unfold is_lft_unit. - simpl. - unfold M1_eq. - reflexivity. -Qed. - -Lemma e1_is_rht_unit_M2: (is_rht_unit M2_mult_as_bin_fun e1). -Proof. - unfold is_rht_unit. - simpl. - intro x. - case x. - simpl. - unfold M1_eq. - reflexivity. - simpl. - unfold M1_eq. - reflexivity. -Qed. - -End p68E1b1. diff --git a/old/twoelemsetoid.v b/old/twoelemsetoid.v deleted file mode 100644 index 198a8305..00000000 --- a/old/twoelemsetoid.v +++ /dev/null @@ -1,315 +0,0 @@ -(* Copyright © 1998-2006 - * Henk Barendregt - * Luís Cruz-Filipe - * Herman Geuvers - * Mariusz Giero - * Rik van Ginneken - * Dimitri Hendriks - * Sébastien Hinderer - * Bart Kirkels - * Pierre Letouzey - * Iris Loeb - * Lionel Mamane - * Milad Niqui - * Russell O’Connor - * Randy Pollack - * Nickolay V. Shmyrev - * Bas Spitters - * Dan Synek - * Freek Wiedijk - * Jan Zwanenburg - * - * This work is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This work is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this work; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -Require Export CSetoidFun. - -Section p68E1b1. - -(** -** Example of a setoid: setoids with two elements -*) - -Inductive M1:Set := -e1:M1 | u:M1. - -Definition M1_eq :(Relation M1):= fun a => fun b => (a=b). - -Definition M1_ap : (Crelation M1):= fun a => fun b => Not (a=b). - -Lemma M1_ap_irreflexive: (irreflexive M1_ap). -Proof. - intro x. - unfold M1_ap. - red. - intuition. -Qed. - -Lemma M1_ap_symmetric: (Csymmetric M1_ap). -Proof. - unfold Csymmetric. - unfold M1_ap. - red. - intuition. -Qed. - -Lemma M1_ap_cotransitive: (cotransitive M1_ap). -Proof. - unfold cotransitive. - unfold M1_ap. - unfold Not. - intros x y H z. - induction x. - induction y. - intuition. - induction z. - intuition. - intuition. - induction y. - induction z. - intuition. - intuition. - intuition. -Qed. - -Lemma M1_eq_dec: forall(x:M1),(M1_eq x e1) or (M1_eq x u). -Proof. - intros x. - induction x. - left. - unfold M1_eq. - reflexivity. - right. - unfold M1_eq. - reflexivity. -Qed. - -Definition is_e1 (x:M1):Prop := -match x with -|e1 => True -|u => False -end. - -Lemma not_M1_eq_e1_u:Not (M1_eq e1 u). -Proof. - red. - intros H. - change (is_e1 u). - unfold M1_eq in H. - rewrite<- H. - exact I. -Qed. - -Lemma M1_ap_tight: (tight_apart M1_eq M1_ap). -Proof. - unfold tight_apart. - unfold M1_eq. - unfold M1_ap. - intros x y. - split. - induction x. - induction y. - intuition. - unfold Not. - intro H. - cut (e1=u -> False). - intuition. - apply not_M1_eq_e1_u. - induction y. - 2:intuition. - 2:unfold Not. - 2:intuition. - unfold Not. - intro H. - cut (e1=u -> False ). - intuition. - apply not_M1_eq_e1_u. -Qed. - -Definition M1_is_CSetoid:(is_CSetoid M1 M1_eq M1_ap) := -(Build_is_CSetoid M1 M1_eq M1_ap M1_ap_irreflexive M1_ap_symmetric M1_ap_cotransitive M1_ap_tight). - -Definition M1_as_CSetoid: CSetoid := -(Build_CSetoid M1 M1_eq M1_ap M1_is_CSetoid). - -Definition M1_mult (x:M1)(y:M1):M1:= -match x with -|e1 => y -|u => match y with - |e1 => u - |u => e1 - end -end. - -Definition M1_CS_mult: M1_as_CSetoid -> M1_as_CSetoid -> M1_as_CSetoid. -Proof. - simpl. - exact M1_mult. -Defined. - -Lemma M1_CS_mult_strext:(bin_fun_strext M1_as_CSetoid M1_as_CSetoid M1_as_CSetoid M1_CS_mult). -Proof. - unfold bin_fun_strext. - intros x1 x2 y1 y2. - case x1. - case x2. - case y1. - case y2. - simpl. - intuition. - simpl. - intuition. - case y2. - simpl. - intuition. - simpl. - intuition. - case y1. - case y2. - simpl. - intuition. - simpl. - unfold M1_ap. - unfold Not. - intuition. - case y2. - simpl. - unfold M1_ap. - unfold Not. - intuition. - simpl. - intro H. - left. - apply M1_ap_symmetric. - exact H. - case x2. - case y1. - case y2. - simpl. - intuition. - simpl. - unfold M1_ap. - unfold Not. - intuition. - case y2. - simpl. - unfold M1_ap. - unfold Not. - intuition. - simpl. - intro H. - left. - apply M1_ap_symmetric. - exact H. - case y1. - case y2. - simpl. - intuition. - simpl. - intro H. - right. - apply M1_ap_symmetric. - exact H. - case y2. - simpl. - intro H. - right. - apply M1_ap_symmetric. - exact H. - simpl. - unfold M1_ap. - unfold Not. - intuition. -Qed. - -Definition M1_mult_as_bin_fun:= -(Build_CSetoid_bin_fun M1_as_CSetoid M1_as_CSetoid M1_as_CSetoid M1_CS_mult M1_CS_mult_strext). - -Definition M2_mult (x:M1)(y:M1):M1:= -match x with -|e1 => y -|u => u -end. - -Definition M2_CS_mult: M1_as_CSetoid -> M1_as_CSetoid -> M1_as_CSetoid. -Proof. - simpl. - exact M2_mult. -Defined. - -Lemma M2_CS_mult_strext: (bin_fun_strext M1_as_CSetoid M1_as_CSetoid M1_as_CSetoid M2_CS_mult). -Proof. - unfold bin_fun_strext. - intros x1 x2 y1 y2. - case x1. - case x2. - case y1. - case y2. - simpl. - intuition. - simpl. - intuition. - case y2. - simpl. - intuition. - simpl. - intuition. - case y1. - case y2. - simpl. - intuition. - simpl. - intuition. - case y2. - simpl. - unfold M1_ap. - unfold Not. - intuition. - simpl. - intuition. - case x2. - case y1. - case y2. - simpl. - intuition. - simpl. - unfold M1_ap. - unfold Not. - intuition. - case y2. - simpl. - intuition. - simpl. - unfold M1_ap. - unfold Not. - intuition. - case y1. - case y2. - simpl. - intuition. - simpl. - intuition. - case y2. - simpl. - intuition. - simpl. - intuition. -Qed. - -Definition M2_mult_as_bin_fun:= - (Build_CSetoid_bin_fun M1_as_CSetoid M1_as_CSetoid M1_as_CSetoid - M2_CS_mult M2_CS_mult_strext). - -End p68E1b1. From b5a64b7a85585b6134ed04c7df1bceff51954232 Mon Sep 17 00:00:00 2001 From: Guillaume Claret Date: Mon, 22 Sep 2014 13:21:29 +0200 Subject: [PATCH 05/20] Some files commented out --- Make | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Make b/Make index dc06117f..32340774 100644 --- a/Make +++ b/Make @@ -42,13 +42,13 @@ coq_reals/Rreals_iso.v coq_reals/Rreals.v coq_reals/Rsign.v -examples/Calculemus2011.v -examples/Circle.v -examples/IntegrationExamples.v -examples/LMCS2011.v -examples/PlotExamples.v -examples/RealFaster.v -examples/RealFast.v +# examples/Calculemus2011.v +# examples/Circle.v +# examples/IntegrationExamples.v +# examples/LMCS2011.v +# examples/PlotExamples.v +# examples/RealFaster.v +# examples/RealFast.v fta/CC_Props.v fta/CPoly_Contin1.v @@ -330,7 +330,7 @@ tactics/DiffTactics1.v tactics/DiffTactics2.v tactics/DiffTactics3.v tactics/FieldReflection.v -#tactics/Opaque_algebra.v +# tactics/Opaque_algebra.v tactics/Qauto.v tactics/rational.ml tactics/Rational.v From 318d7dd85cd01c7a09813e1690ca03899316db9d Mon Sep 17 00:00:00 2001 From: Bas Spitters Date: Thu, 25 Sep 2014 17:54:32 +0200 Subject: [PATCH 06/20] Remoing obsolete tactic --- tactics/rational.ml | 512 -------------------------------------------- 1 file changed, 512 deletions(-) delete mode 100644 tactics/rational.ml diff --git a/tactics/rational.ml b/tactics/rational.ml deleted file mode 100644 index c2fdecfb..00000000 --- a/tactics/rational.ml +++ /dev/null @@ -1,512 +0,0 @@ -(* Copyright © 1998-2006 - * Henk Barendregt - * Luís Cruz-Filipe - * Herman Geuvers - * Mariusz Giero - * Rik van Ginneken - * Dimitri Hendriks - * Sébastien Hinderer - * Bart Kirkels - * Pierre Letouzey - * Iris Loeb - * Lionel Mamane - * Milad Niqui - * Russell O’Connor - * Randy Pollack - * Nickolay V. Shmyrev - * Bas Spitters - * Dan Synek - * Freek Wiedijk - * Jan Zwanenburg - * - * This work is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This work is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this work; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -open Util -open Pp -open Printer -open Term -open Names -open Nameops -open Libnames -open Closure -open Reductionops -open Tactics -open Tacmach -open Proof_trees -open Environ -open Declarations -open Inductiveops - -let coq_modules = Coqlib.init_modules @ Coqlib.zarith_base_modules - -let coq_constant s = - Coqlib.gen_constant_in_modules "CoRN" coq_modules s - -let constant s = - try - constr_of_reference (Nametab.absolute_reference (path_of_string s)) - with Not_found -> - error (Printf.sprintf "constant %s" s) - | Anomaly _ -> - error (Printf.sprintf "constant %s" s) - -let constant_algebra s = constant ("CoRN.algebra." ^ s) -let constant_tactics s = constant ("CoRN.tactics." ^ s) - -type xexpr = - X_var of int - | X_unop of int * xexpr - | X_binop of int * xexpr * xexpr - | X_part of int * xexpr * constr - | X_int of int - | X_plus of xexpr * xexpr - | X_mult of xexpr * xexpr - | X_div of xexpr * xexpr * constr - | X_zero - | X_one - | X_nat of int - | X_inv of xexpr - | X_minus of xexpr * xexpr - | X_power of xexpr * int - -let hd_app c = fst (destApplication c) - -let args_app c = snd (destApplication c) - -let first_arg c = (args_app c).(0) -let third_arg c = (args_app c).(2) -let sixth_arg c = (args_app c).(5) - -let xinterp g c = sixth_arg (pf_type_of g c) - -let mk_existential env = Evarutil.new_evar_in_sign env - -let mk_lambda n t c = mkLambda (n,t,c) -let mk_cast c t = mkCast (c,t) -let mk_case ci a b c = mkCase (ci,a,b,c) - -let pf_nf_betadeltaiota = pf_reduce nf_betadeltaiota -let pf_cbv_betadeltaiota = pf_reduce Tacred.cbv_betadeltaiota - -let pf_whd_all_but sp = - let flags = - RedFlags.red_sub - (RedFlags.red_add_transparent betadeltaiota (Conv_oracle.freeze())) - (RedFlags.fCONST sp) in - pf_reduce (clos_norm_flags flags) - -let xrational verbose g a = - - let cr_crr = constant_algebra "CRings.cr_crr" - and cf_crr = constant_algebra "CFields.cf_crr" in - - let the_csetoid = a.(0) in - let the_csemigroup = first_arg the_csetoid in - let the_cmonoid = first_arg the_csemigroup in - let the_cgroup = first_arg the_cmonoid in - let the_cabgroup = first_arg the_cgroup in - - let the_cstructure,the_suffix,the_file = - if isApp the_cabgroup && hd_app the_cabgroup = cr_crr then - let the_cring = first_arg the_cabgroup in - if isApp the_cring && hd_app the_cring = cf_crr then - let the_cfield = first_arg the_cring in - the_cfield,"F","FieldReflection" - else the_cring,"R","RingReflection" - else the_cabgroup,"G","GroupReflection" in - - let nat_nat = coq_constant "nat" - and nat_O = coq_constant "O" - and nat_S = coq_constant "S" - and refl_equal = coq_constant "refl_equal" - and bool_bool = coq_constant "bool" - and bool_true = coq_constant "true" - and pos_xI = coq_constant "xI" - and pos_xO = coq_constant "xO" - and pos_xH = coq_constant "xH" - and int_ZERO = coq_constant "ZERO" - and int_POS = coq_constant "POS" - and int_NEG = coq_constant "NEG" - - and cs_eq = constant_algebra "CSetoids.cs_eq" in - - let xexpr_constant s = - try constant_tactics (the_file ^ ".xexpr" ^ the_suffix ^ "_" ^ s) - with _ -> nat_O in - let xexpr_var = xexpr_constant "var" - and xexpr_unop = xexpr_constant "unop" - and xexpr_binop = xexpr_constant "binop" - and xexpr_part = xexpr_constant "part" - and xexpr_int = xexpr_constant "int" - and xexpr_plus = xexpr_constant "plus" - and xexpr_mult = xexpr_constant "mult" - and xexpr_div = xexpr_constant "div" - and xexpr_zero = xexpr_constant "zero" - and xexpr_one = xexpr_constant "one" - and xexpr_nat = xexpr_constant "nat" - and xexpr_inv = xexpr_constant "inv" - and xexpr_minus = xexpr_constant "minus" - and xexpr_power = xexpr_constant "power" in - - let the_file_constant s = constant_tactics - (the_file ^ "." ^ s ^ the_suffix) in - let xforget = the_file_constant "xforget" - and tactic_lemma = the_file_constant "Tactic_lemma" in - - let norm = constant_tactics ("AlgReflection.Norm" ^ the_suffix) in - - let csf_fun = constant_algebra "CSetoids.csf_fun" - and csbf_fun = constant_algebra "CSetoids.csbf_fun" - and csg_unit = constant_algebra "CMonoids.cm_unit" - and cr_one = constant_algebra "CRings.cr_one" - and nring = constant_algebra "CRings.nring" - and zring = constant_algebra "CRings.zring" - and csg_op = constant_algebra "CSemiGroups.csg_op" - and cg_inv = constant_algebra "CGroups.cg_inv" - and cg_minus = constant_algebra "CGroups.cg_minus" - and cr_mult = constant_algebra "CRings.cr_mult" - and cf_div = constant_algebra "CFields.cf_div" - and nexp_op = constant_algebra "CRings.nexp_op" - and expr_minus = constant_tactics "AlgReflection.expr_minus" - and pfpfun = constant_algebra "CSetoidFun.pfpfun" - and id_un_op = constant_algebra "CSetoids.id_un_op" - and cs_binproj1 = constant_algebra "CSetoidFun.cs_binproj1" - and fid = constant_algebra "CSetoidFun.Fid" - and csetoid_un_op = constant_algebra "CSetoids.CSetoid_un_op" - and csetoid_bin_op = constant_algebra "CSetoids.CSetoid_bin_op" - and partFunct = constant_algebra "CSetoidFun.PartFunct" - - in - - let ind_of_ref = function - | IndRef (kn,i) -> (kn,i) - | _ -> anomaly "IndRef expected" in - - let nat_info = - let nat = ind_of_ref Coqlib.glob_nat in - make_default_case_info (Global.env()) RegularStyle nat - in - - let rec evalnat n = - if eq_constr n nat_O then 0 - else if isApp n & eq_constr (hd_app n) nat_S then - let a = args_app n in - if Array.length a > 0 then (evalnat a.(0)) + 1 - else raise (Failure "evalnat") - else raise (Failure "evalnat") in - - let rec evalpos n = - if eq_constr n pos_xH then 1 - else if isApp n then - let f = hd_app n - and a = args_app n in - if Array.length a > 0 then - if eq_constr f pos_xI then 2 * (evalpos a.(0)) + 1 - else if eq_constr f pos_xO then 2 * (evalpos a.(0)) - else raise (Failure "evalint") - else raise (Failure "evalint") - else raise (Failure "evalint") in - - let rec evalint n = - if eq_constr n int_ZERO then 0 - else if isApp n then - let f = hd_app n - and a = args_app n in - if Array.length a > 0 then - if eq_constr f int_POS then evalpos a.(0) - else if eq_constr f int_NEG then -(evalpos a.(0)) - else raise (Failure "evalint") - else raise (Failure "evalint") - else raise (Failure "evalint") in - - let rec envindex : constr * constr list -> int * constr list = - function (x,e) -> - match e with - [] -> (0,[x]) - | y::f -> - if eq_constr x y then (0, e) else - let (i,g) = envindex (x,f) in - (i + 1, y::g) in - - let liftV : constr * constr list * constr list * constr list * constr list -> xexpr * constr list * constr list * constr list * constr list = - function (x,eV,eU,eB,eP) -> let (i,fV) = envindex (x,eV) in (X_var i, fV,eU,eB,eP) in - - let rec - liftU : constr * constr * constr list * constr list * constr list * constr list -> xexpr * constr list * constr list * constr list * constr list = - function (f,x,eV,eU,eB,eP) -> - let (x',fV,fU,fB,fP) = lift (x,eV,eU,eB,eP) in - let (i,gU) = envindex (f,fU) in (X_unop(i,x'),fV,gU,fB,fP) and - - liftB : constr * constr * constr * constr list * constr list * constr list * constr list -> xexpr * constr list * constr list * constr list * constr list = - function (f,x,y,eV,eU,eB,eP) -> - let (x',fV,fU,fB,fP) = lift (x,eV,eU,eB,eP) in - let (y',gV,gU,gB,gP) = lift (y,fV,fU,fB,fP) in - let (i,hB) = envindex (f,gB) in (X_binop(i,x',y'),gV,gU,hB,gP) and - - liftP : constr * constr * constr * constr list * constr list * constr list * constr list -> xexpr * constr list * constr list * constr list * constr list = - function (x,y,h,eV,eU,eB,eP) -> let (z,fV,fU,fB,fP) = lift (y,eV,eU,eB,eP) in - let (i,gP) = envindex (x,fP) in (X_part(i,z,h), fV,fU,fB,gP) and - - lift : constr * constr list * constr list * constr list * constr list -> xexpr * constr list * constr list * constr list * constr list = - function (x0,eV,eU,eB,eP) -> - let x = strip_outer_cast x0 in - if isApp x then - let f = hd_app x - and a = args_app x in - if eq_constr f csg_unit then (X_zero, eV,eU,eB,eP) - else if eq_constr f cr_one then (X_one, eV,eU,eB,eP) - else if eq_constr f nring & Array.length a > 1 then - try (X_nat(evalnat a.(1)), eV,eU,eB,eP) - with Failure "evalnat" -> liftV (x,eV,eU,eB,eP) - else if eq_constr f zring & Array.length a > 1 then - try (X_int(evalint a.(1)), eV,eU,eB,eP) - with Failure "evalint" -> liftV (x,eV,eU,eB,eP) - else if eq_constr f pfpfun & Array.length a > 3 then - liftP(a.(1),a.(2),a.(3),eV,eU,eB,eP) - else if eq_constr f csbf_fun then - if Array.length a > 5 & eq_constr a.(0) a.(2) & eq_constr a.(1) a.(2) - then - if isApp a.(3) then - let g = hd_app a.(3) in - if eq_constr g csg_op - then - let (t1,e1V,e1U,e1B,e1P) = lift (a.(4),eV,eU,eB,eP) in - let (t2,e2V,e2U,e2B,e2P) = lift (a.(5),e1V,e1U,e1B,e1P) in - (X_plus(t1,t2), e2V,e2U,e2B,e2P) - else - if eq_constr g cr_mult - then - let (t1,e1V,e1U,e1B,e1P) = lift (a.(4),eV,eU,eB,eP) in - let (t2,e2V,e2U,e2B,e2P) = lift (a.(5),e1V,e1U,e1B,e1P) in - (X_mult(t1,t2), e2V,e2U,e2B,e2P) - else liftB(a.(3),a.(4),a.(5),eV,eU,eB,eP) - else liftB(a.(3),a.(4),a.(5),eV,eU,eB,eP) - else liftV (x,eV,eU,eB,eP) - else if eq_constr f csf_fun then - if Array.length a > 3 & eq_constr a.(0) a.(1) then - if isApp a.(2) then - let g = hd_app a.(2) in - let b = args_app a.(2) in - if eq_constr g cg_inv then - let (t1,e1V,e1U,e1B,e1P) = lift (a.(3),eV,eU,eB,eP) in - (X_inv(t1), e1V,e1U,e1B,e1P) - else - if eq_constr g nexp_op & Array.length b > 1 then - try - let n = evalnat b.(1) in - let (t1,e1V,e1U,e1B,e1P) = lift (a.(3),eV,eU,eB,eP) in - (X_power(t1,n), e1V,e1U,e1B,e1P) - with Failure "evalnat" -> liftV (x,eV,eU,eB,eP) - else liftU (a.(2),a.(3),eV,eU,eB,eP) - else liftU (a.(2),a.(3),eV,eU,eB,eP) - else liftV (x,eV,eU,eB,eP) - else if eq_constr f cg_minus then - if Array.length a > 2 then - let (t1,e1V,e1U,e1B,e1P) = lift (a.(1),eV,eU,eB,eP) in - let (t2,e2V,e2U,e2B,e2P) = lift (a.(2),e1V,e1U,e1B,e1P) in - (X_minus(t1,t2), e2V,e2U,e2B,e2P) - else liftV (x,eV,eU,eB,eP) - else if eq_constr f cf_div then - if Array.length a > 3 then - let (t1,e1V,e1U,e1B,e1P) = lift (a.(1),eV,eU,eB,eP) in - let (t2,e2V,e2U,e2B,e2P) = lift (a.(2),e1V,e1U,e1B,e1P) in - (X_div(t1,t2,a.(3)), e2V,e2U,e2B,e2P) - else liftV (x,eV,eU,eB,eP) - else if isApp f then - lift ((collapse_appl x), eV,eU,eB,eP) - else liftV (x,eV,eU,eB,eP) - else liftV (x,eV,eU,eB,eP) in - - let rec natconstr i = - if i > 0 then mkApp(nat_S, [| natconstr (i - 1) |]) else nat_O in - - let rec posconstr k = - if k == 1 then pos_xH else - let l = k mod 2 in - mkApp((if l == 0 then pos_xO else pos_xI), [| posconstr (k / 2) |]) in - - let rec intconstr k = - if k == 0 then int_ZERO else - if k > 0 then mkApp(int_POS, [| posconstr k |]) else - mkApp(int_NEG, [| posconstr (- k) |]) in - - let rec xexprconstr t rhoV rhoU rhoB rhoP = - match t with - X_var i -> mkApp(xexpr_var, [| the_cstructure; rhoV; rhoU; rhoB; rhoP; natconstr i |]) - | X_unop (i,t1) -> - let c1 = xexprconstr t1 rhoV rhoU rhoB rhoP in - mkApp(xexpr_unop, [| the_cstructure; rhoV; rhoU; rhoB; rhoP; xinterp g c1; natconstr i; c1 |]) - | X_binop (i,t1,t2) -> - let c1 = xexprconstr t1 rhoV rhoU rhoB rhoP in - let c2 = xexprconstr t2 rhoV rhoU rhoB rhoP in - mkApp(xexpr_binop, [| the_cstructure; rhoV; rhoU; rhoB; rhoP; xinterp g c1; xinterp g c2; natconstr i; c1; c2 |]) - | X_part (i,t,h) -> - let c = xexprconstr t rhoV rhoU rhoB rhoP in - mkApp(xexpr_part, [| the_cstructure; rhoV; rhoU; rhoB; rhoP; xinterp g c; natconstr i; c; h |]) - | X_int i -> mkApp(xexpr_int, [| the_cstructure; rhoV; rhoU; rhoB; rhoP; intconstr i |]) - | X_plus (t1,t2) -> - let c1 = xexprconstr t1 rhoV rhoU rhoB rhoP - and c2 = xexprconstr t2 rhoV rhoU rhoB rhoP in - mkApp(xexpr_plus, [| the_cstructure; rhoV; rhoU; rhoB; rhoP; - xinterp g c1; xinterp g c2; c1; c2 |]) - | X_mult (t1,t2) -> - let c1 = xexprconstr t1 rhoV rhoU rhoB rhoP - and c2 = xexprconstr t2 rhoV rhoU rhoB rhoP in - mkApp(xexpr_mult, [| the_cstructure; rhoV; rhoU; rhoB; rhoP; - xinterp g c1; xinterp g c2; c1; c2 |]) - | X_div (t1,t2,nz) -> - let c1 = xexprconstr t1 rhoV rhoU rhoB rhoP - and c2 = xexprconstr t2 rhoV rhoU rhoB rhoP in - mkApp(xexpr_div, [| the_cstructure; rhoV; rhoU; rhoB; rhoP; - xinterp g c1; xinterp g c2; c1; c2; nz |]) - | X_zero -> - mkApp(xexpr_zero, [| the_cstructure; rhoV; rhoU; rhoB; rhoP |]) - | X_one -> - mkApp(xexpr_one, [| the_cstructure; rhoV; rhoU; rhoB; rhoP |]) - | X_nat i -> - mkApp(xexpr_nat, [| the_cstructure; rhoV; rhoU; rhoB; rhoP; natconstr i |]) - | X_inv (t1) -> - let c1 = xexprconstr t1 rhoV rhoU rhoB rhoP in - mkApp(xexpr_inv, [| the_cstructure; rhoV; rhoU; rhoB; rhoP; xinterp g c1; c1 |]) - | X_minus (t1,t2) -> - let c1 = xexprconstr t1 rhoV rhoU rhoB rhoP - and c2 = xexprconstr t2 rhoV rhoU rhoB rhoP in - mkApp(xexpr_minus, [| the_cstructure; rhoV; rhoU; rhoB; rhoP; - xinterp g c1; xinterp g c2; c1; c2 |]) - | X_power (t1,n) -> - let c1 = xexprconstr t1 rhoV rhoU rhoB rhoP in - mkApp(xexpr_power, [| the_cstructure; rhoV; rhoU; rhoB; rhoP; - xinterp g c1; c1; natconstr n |]) in - - let rec valconstr e ta = - match e with - [] -> mk_lambda Anonymous nat_nat - (mk_cast (mkApp(csg_unit, [|the_cmonoid |])) ta) - | [c] -> mk_lambda Anonymous nat_nat c - | c::f -> mk_lambda (Name (id_of_string "n")) nat_nat - (mk_case nat_info ta (mkRel 1) [| c; valconstr f ta |]) in - - let rec unconstr e ta = - match e with - [] -> mk_lambda Anonymous nat_nat - (mk_cast (mkApp(id_un_op, [|the_csetoid |])) ta) - | [c] -> mk_lambda Anonymous nat_nat c - | c::f -> mk_lambda (Name (id_of_string "n")) nat_nat - (mk_case nat_info ta (mkRel 1) [| c; unconstr f ta |]) in - - let rec binconstr e ta = - match e with - [] -> mk_lambda Anonymous nat_nat - (mk_cast (mkApp(cs_binproj1, [|the_csetoid |])) ta) - | [c] -> mk_lambda Anonymous nat_nat c - | c::f -> mk_lambda (Name (id_of_string "n")) nat_nat - (mk_case nat_info ta (mkRel 1) [| c; binconstr f ta |]) in - - let rec funconstr e ta = - match e with - [] -> mk_lambda Anonymous nat_nat - (mk_cast (mkApp(fid, [|the_csetoid |])) ta) - | [c] -> mk_lambda Anonymous nat_nat c - | c::f -> mk_lambda (Name (id_of_string "n")) nat_nat - (mk_case nat_info ta (mkRel 1) [| c; funconstr f ta |]) in - - let rec printval i e = - match e with - [] -> () - | c::f -> - msgnl (str "(" ++ int i ++ str ") -> " ++ prterm c); - printval (i + 1) f in - - let report g fV fU fB fP a xleft xright rhoV rhoU rhoB rhoP = - (let left = - pf_nf_betadeltaiota g - (mkApp(xforget, [| the_cstructure; rhoV; rhoU; rhoB; rhoP; xinterp g xleft; xleft |])) - and right = - pf_nf_betadeltaiota g - (mkApp(xforget, [| the_cstructure; rhoV; rhoU; rhoB; rhoP; xinterp g xright; xright |])) - in - let nleft = - pf_cbv_betadeltaiota g (mkApp(norm, [| left |])) - and nright = - pf_cbv_betadeltaiota g (mkApp(norm, [| right |])) - in - msgnl (mt ()); printval 0 fV; msgnl (mt ()); - msgnl (mt ()); printval 0 fU; msgnl (mt ()); - msgnl (mt ()); printval 0 fB; msgnl (mt ()); - msgnl (mt ()); printval 0 fP; msgnl (mt ()); - msgnl (prterm a.(1)); - msgnl ( prterm left ); - msgnl ( prterm nleft ++ fnl ()); - msgnl ( prterm a.(2) ); - msgnl ( prterm right ); - msgnl ( prterm nright ++ fnl ()); - if the_suffix = "F" then - let difference = - (pf_cbv_betadeltaiota g - (mkApp(norm, [| mkApp(expr_minus, [| left; right |]) |]))) in - msgnl ( prterm difference ++ fnl ()) - else ()) - in - - let ta = pf_type_of g a.(1) in - let fleft = a.(1) and fright = a.(2) in - let (l,eV,eU,eB,eP) = lift (fleft,[],[],[],[]) in - let (r,fV,fU,fB,fP) = lift (fright,eV,eU,eB,eP) in - let rhoV = valconstr fV ta in - let rhoU = unconstr fU (mkApp(csetoid_un_op, [|the_csetoid|])) in - let rhoB = binconstr fB (mkApp(csetoid_bin_op, [|the_csetoid|])) in - let rhoP = funconstr fP (mkApp(partFunct, [|the_csetoid|])) in - let xleft = xexprconstr l rhoV rhoU rhoB rhoP - and xright = xexprconstr r rhoV rhoU rhoB rhoP in - if verbose then - report g fV fU fB fP a xleft xright rhoV rhoU rhoB rhoP; - let term = - mkApp(tactic_lemma, - [| the_cstructure; rhoV; rhoU; rhoB; rhoP; fleft; fright; xleft; xright; - mkApp(refl_equal, [| bool_bool; bool_true |]) |]) - in - let result = - try - exact_check term g - with e when Logic.catchable_exception e -> error "cannot establish equality" - in - if verbose then msgnl (str "end Rational"); - result - - -let hrational verbose g = - - let cs_eq = constant_algebra "CSetoids.cs_eq" in - - let c = strip_outer_cast (pf_concl g) in - if isApp c & eq_constr (hd_app c) cs_eq then - let a = args_app c in - if Array.length a > 2 then - xrational verbose g a - else error "not an [=] equation" - else error "not an [=] equation" - -let hrational1 verbose g = - if verbose then msgnl (str "begin Rational"); - hrational verbose g - -TACTIC EXTEND Rational -| ["Rational"] -> [ hrational1 false ] -END - -TACTIC EXTEND RationalVerbose -| ["Rational" "Verbose"] -> [ hrational1 true ] -END From 0e342f214f9c7792b1388cff029aefaf948969c9 Mon Sep 17 00:00:00 2001 From: Guillaume Claret Date: Thu, 25 Sep 2014 18:16:15 +0200 Subject: [PATCH 07/20] rational.ml not used anymore --- tactics/rational.ml | 512 -------------------------------------------- 1 file changed, 512 deletions(-) delete mode 100644 tactics/rational.ml diff --git a/tactics/rational.ml b/tactics/rational.ml deleted file mode 100644 index c2fdecfb..00000000 --- a/tactics/rational.ml +++ /dev/null @@ -1,512 +0,0 @@ -(* Copyright © 1998-2006 - * Henk Barendregt - * Luís Cruz-Filipe - * Herman Geuvers - * Mariusz Giero - * Rik van Ginneken - * Dimitri Hendriks - * Sébastien Hinderer - * Bart Kirkels - * Pierre Letouzey - * Iris Loeb - * Lionel Mamane - * Milad Niqui - * Russell O’Connor - * Randy Pollack - * Nickolay V. Shmyrev - * Bas Spitters - * Dan Synek - * Freek Wiedijk - * Jan Zwanenburg - * - * This work is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This work is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this work; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -open Util -open Pp -open Printer -open Term -open Names -open Nameops -open Libnames -open Closure -open Reductionops -open Tactics -open Tacmach -open Proof_trees -open Environ -open Declarations -open Inductiveops - -let coq_modules = Coqlib.init_modules @ Coqlib.zarith_base_modules - -let coq_constant s = - Coqlib.gen_constant_in_modules "CoRN" coq_modules s - -let constant s = - try - constr_of_reference (Nametab.absolute_reference (path_of_string s)) - with Not_found -> - error (Printf.sprintf "constant %s" s) - | Anomaly _ -> - error (Printf.sprintf "constant %s" s) - -let constant_algebra s = constant ("CoRN.algebra." ^ s) -let constant_tactics s = constant ("CoRN.tactics." ^ s) - -type xexpr = - X_var of int - | X_unop of int * xexpr - | X_binop of int * xexpr * xexpr - | X_part of int * xexpr * constr - | X_int of int - | X_plus of xexpr * xexpr - | X_mult of xexpr * xexpr - | X_div of xexpr * xexpr * constr - | X_zero - | X_one - | X_nat of int - | X_inv of xexpr - | X_minus of xexpr * xexpr - | X_power of xexpr * int - -let hd_app c = fst (destApplication c) - -let args_app c = snd (destApplication c) - -let first_arg c = (args_app c).(0) -let third_arg c = (args_app c).(2) -let sixth_arg c = (args_app c).(5) - -let xinterp g c = sixth_arg (pf_type_of g c) - -let mk_existential env = Evarutil.new_evar_in_sign env - -let mk_lambda n t c = mkLambda (n,t,c) -let mk_cast c t = mkCast (c,t) -let mk_case ci a b c = mkCase (ci,a,b,c) - -let pf_nf_betadeltaiota = pf_reduce nf_betadeltaiota -let pf_cbv_betadeltaiota = pf_reduce Tacred.cbv_betadeltaiota - -let pf_whd_all_but sp = - let flags = - RedFlags.red_sub - (RedFlags.red_add_transparent betadeltaiota (Conv_oracle.freeze())) - (RedFlags.fCONST sp) in - pf_reduce (clos_norm_flags flags) - -let xrational verbose g a = - - let cr_crr = constant_algebra "CRings.cr_crr" - and cf_crr = constant_algebra "CFields.cf_crr" in - - let the_csetoid = a.(0) in - let the_csemigroup = first_arg the_csetoid in - let the_cmonoid = first_arg the_csemigroup in - let the_cgroup = first_arg the_cmonoid in - let the_cabgroup = first_arg the_cgroup in - - let the_cstructure,the_suffix,the_file = - if isApp the_cabgroup && hd_app the_cabgroup = cr_crr then - let the_cring = first_arg the_cabgroup in - if isApp the_cring && hd_app the_cring = cf_crr then - let the_cfield = first_arg the_cring in - the_cfield,"F","FieldReflection" - else the_cring,"R","RingReflection" - else the_cabgroup,"G","GroupReflection" in - - let nat_nat = coq_constant "nat" - and nat_O = coq_constant "O" - and nat_S = coq_constant "S" - and refl_equal = coq_constant "refl_equal" - and bool_bool = coq_constant "bool" - and bool_true = coq_constant "true" - and pos_xI = coq_constant "xI" - and pos_xO = coq_constant "xO" - and pos_xH = coq_constant "xH" - and int_ZERO = coq_constant "ZERO" - and int_POS = coq_constant "POS" - and int_NEG = coq_constant "NEG" - - and cs_eq = constant_algebra "CSetoids.cs_eq" in - - let xexpr_constant s = - try constant_tactics (the_file ^ ".xexpr" ^ the_suffix ^ "_" ^ s) - with _ -> nat_O in - let xexpr_var = xexpr_constant "var" - and xexpr_unop = xexpr_constant "unop" - and xexpr_binop = xexpr_constant "binop" - and xexpr_part = xexpr_constant "part" - and xexpr_int = xexpr_constant "int" - and xexpr_plus = xexpr_constant "plus" - and xexpr_mult = xexpr_constant "mult" - and xexpr_div = xexpr_constant "div" - and xexpr_zero = xexpr_constant "zero" - and xexpr_one = xexpr_constant "one" - and xexpr_nat = xexpr_constant "nat" - and xexpr_inv = xexpr_constant "inv" - and xexpr_minus = xexpr_constant "minus" - and xexpr_power = xexpr_constant "power" in - - let the_file_constant s = constant_tactics - (the_file ^ "." ^ s ^ the_suffix) in - let xforget = the_file_constant "xforget" - and tactic_lemma = the_file_constant "Tactic_lemma" in - - let norm = constant_tactics ("AlgReflection.Norm" ^ the_suffix) in - - let csf_fun = constant_algebra "CSetoids.csf_fun" - and csbf_fun = constant_algebra "CSetoids.csbf_fun" - and csg_unit = constant_algebra "CMonoids.cm_unit" - and cr_one = constant_algebra "CRings.cr_one" - and nring = constant_algebra "CRings.nring" - and zring = constant_algebra "CRings.zring" - and csg_op = constant_algebra "CSemiGroups.csg_op" - and cg_inv = constant_algebra "CGroups.cg_inv" - and cg_minus = constant_algebra "CGroups.cg_minus" - and cr_mult = constant_algebra "CRings.cr_mult" - and cf_div = constant_algebra "CFields.cf_div" - and nexp_op = constant_algebra "CRings.nexp_op" - and expr_minus = constant_tactics "AlgReflection.expr_minus" - and pfpfun = constant_algebra "CSetoidFun.pfpfun" - and id_un_op = constant_algebra "CSetoids.id_un_op" - and cs_binproj1 = constant_algebra "CSetoidFun.cs_binproj1" - and fid = constant_algebra "CSetoidFun.Fid" - and csetoid_un_op = constant_algebra "CSetoids.CSetoid_un_op" - and csetoid_bin_op = constant_algebra "CSetoids.CSetoid_bin_op" - and partFunct = constant_algebra "CSetoidFun.PartFunct" - - in - - let ind_of_ref = function - | IndRef (kn,i) -> (kn,i) - | _ -> anomaly "IndRef expected" in - - let nat_info = - let nat = ind_of_ref Coqlib.glob_nat in - make_default_case_info (Global.env()) RegularStyle nat - in - - let rec evalnat n = - if eq_constr n nat_O then 0 - else if isApp n & eq_constr (hd_app n) nat_S then - let a = args_app n in - if Array.length a > 0 then (evalnat a.(0)) + 1 - else raise (Failure "evalnat") - else raise (Failure "evalnat") in - - let rec evalpos n = - if eq_constr n pos_xH then 1 - else if isApp n then - let f = hd_app n - and a = args_app n in - if Array.length a > 0 then - if eq_constr f pos_xI then 2 * (evalpos a.(0)) + 1 - else if eq_constr f pos_xO then 2 * (evalpos a.(0)) - else raise (Failure "evalint") - else raise (Failure "evalint") - else raise (Failure "evalint") in - - let rec evalint n = - if eq_constr n int_ZERO then 0 - else if isApp n then - let f = hd_app n - and a = args_app n in - if Array.length a > 0 then - if eq_constr f int_POS then evalpos a.(0) - else if eq_constr f int_NEG then -(evalpos a.(0)) - else raise (Failure "evalint") - else raise (Failure "evalint") - else raise (Failure "evalint") in - - let rec envindex : constr * constr list -> int * constr list = - function (x,e) -> - match e with - [] -> (0,[x]) - | y::f -> - if eq_constr x y then (0, e) else - let (i,g) = envindex (x,f) in - (i + 1, y::g) in - - let liftV : constr * constr list * constr list * constr list * constr list -> xexpr * constr list * constr list * constr list * constr list = - function (x,eV,eU,eB,eP) -> let (i,fV) = envindex (x,eV) in (X_var i, fV,eU,eB,eP) in - - let rec - liftU : constr * constr * constr list * constr list * constr list * constr list -> xexpr * constr list * constr list * constr list * constr list = - function (f,x,eV,eU,eB,eP) -> - let (x',fV,fU,fB,fP) = lift (x,eV,eU,eB,eP) in - let (i,gU) = envindex (f,fU) in (X_unop(i,x'),fV,gU,fB,fP) and - - liftB : constr * constr * constr * constr list * constr list * constr list * constr list -> xexpr * constr list * constr list * constr list * constr list = - function (f,x,y,eV,eU,eB,eP) -> - let (x',fV,fU,fB,fP) = lift (x,eV,eU,eB,eP) in - let (y',gV,gU,gB,gP) = lift (y,fV,fU,fB,fP) in - let (i,hB) = envindex (f,gB) in (X_binop(i,x',y'),gV,gU,hB,gP) and - - liftP : constr * constr * constr * constr list * constr list * constr list * constr list -> xexpr * constr list * constr list * constr list * constr list = - function (x,y,h,eV,eU,eB,eP) -> let (z,fV,fU,fB,fP) = lift (y,eV,eU,eB,eP) in - let (i,gP) = envindex (x,fP) in (X_part(i,z,h), fV,fU,fB,gP) and - - lift : constr * constr list * constr list * constr list * constr list -> xexpr * constr list * constr list * constr list * constr list = - function (x0,eV,eU,eB,eP) -> - let x = strip_outer_cast x0 in - if isApp x then - let f = hd_app x - and a = args_app x in - if eq_constr f csg_unit then (X_zero, eV,eU,eB,eP) - else if eq_constr f cr_one then (X_one, eV,eU,eB,eP) - else if eq_constr f nring & Array.length a > 1 then - try (X_nat(evalnat a.(1)), eV,eU,eB,eP) - with Failure "evalnat" -> liftV (x,eV,eU,eB,eP) - else if eq_constr f zring & Array.length a > 1 then - try (X_int(evalint a.(1)), eV,eU,eB,eP) - with Failure "evalint" -> liftV (x,eV,eU,eB,eP) - else if eq_constr f pfpfun & Array.length a > 3 then - liftP(a.(1),a.(2),a.(3),eV,eU,eB,eP) - else if eq_constr f csbf_fun then - if Array.length a > 5 & eq_constr a.(0) a.(2) & eq_constr a.(1) a.(2) - then - if isApp a.(3) then - let g = hd_app a.(3) in - if eq_constr g csg_op - then - let (t1,e1V,e1U,e1B,e1P) = lift (a.(4),eV,eU,eB,eP) in - let (t2,e2V,e2U,e2B,e2P) = lift (a.(5),e1V,e1U,e1B,e1P) in - (X_plus(t1,t2), e2V,e2U,e2B,e2P) - else - if eq_constr g cr_mult - then - let (t1,e1V,e1U,e1B,e1P) = lift (a.(4),eV,eU,eB,eP) in - let (t2,e2V,e2U,e2B,e2P) = lift (a.(5),e1V,e1U,e1B,e1P) in - (X_mult(t1,t2), e2V,e2U,e2B,e2P) - else liftB(a.(3),a.(4),a.(5),eV,eU,eB,eP) - else liftB(a.(3),a.(4),a.(5),eV,eU,eB,eP) - else liftV (x,eV,eU,eB,eP) - else if eq_constr f csf_fun then - if Array.length a > 3 & eq_constr a.(0) a.(1) then - if isApp a.(2) then - let g = hd_app a.(2) in - let b = args_app a.(2) in - if eq_constr g cg_inv then - let (t1,e1V,e1U,e1B,e1P) = lift (a.(3),eV,eU,eB,eP) in - (X_inv(t1), e1V,e1U,e1B,e1P) - else - if eq_constr g nexp_op & Array.length b > 1 then - try - let n = evalnat b.(1) in - let (t1,e1V,e1U,e1B,e1P) = lift (a.(3),eV,eU,eB,eP) in - (X_power(t1,n), e1V,e1U,e1B,e1P) - with Failure "evalnat" -> liftV (x,eV,eU,eB,eP) - else liftU (a.(2),a.(3),eV,eU,eB,eP) - else liftU (a.(2),a.(3),eV,eU,eB,eP) - else liftV (x,eV,eU,eB,eP) - else if eq_constr f cg_minus then - if Array.length a > 2 then - let (t1,e1V,e1U,e1B,e1P) = lift (a.(1),eV,eU,eB,eP) in - let (t2,e2V,e2U,e2B,e2P) = lift (a.(2),e1V,e1U,e1B,e1P) in - (X_minus(t1,t2), e2V,e2U,e2B,e2P) - else liftV (x,eV,eU,eB,eP) - else if eq_constr f cf_div then - if Array.length a > 3 then - let (t1,e1V,e1U,e1B,e1P) = lift (a.(1),eV,eU,eB,eP) in - let (t2,e2V,e2U,e2B,e2P) = lift (a.(2),e1V,e1U,e1B,e1P) in - (X_div(t1,t2,a.(3)), e2V,e2U,e2B,e2P) - else liftV (x,eV,eU,eB,eP) - else if isApp f then - lift ((collapse_appl x), eV,eU,eB,eP) - else liftV (x,eV,eU,eB,eP) - else liftV (x,eV,eU,eB,eP) in - - let rec natconstr i = - if i > 0 then mkApp(nat_S, [| natconstr (i - 1) |]) else nat_O in - - let rec posconstr k = - if k == 1 then pos_xH else - let l = k mod 2 in - mkApp((if l == 0 then pos_xO else pos_xI), [| posconstr (k / 2) |]) in - - let rec intconstr k = - if k == 0 then int_ZERO else - if k > 0 then mkApp(int_POS, [| posconstr k |]) else - mkApp(int_NEG, [| posconstr (- k) |]) in - - let rec xexprconstr t rhoV rhoU rhoB rhoP = - match t with - X_var i -> mkApp(xexpr_var, [| the_cstructure; rhoV; rhoU; rhoB; rhoP; natconstr i |]) - | X_unop (i,t1) -> - let c1 = xexprconstr t1 rhoV rhoU rhoB rhoP in - mkApp(xexpr_unop, [| the_cstructure; rhoV; rhoU; rhoB; rhoP; xinterp g c1; natconstr i; c1 |]) - | X_binop (i,t1,t2) -> - let c1 = xexprconstr t1 rhoV rhoU rhoB rhoP in - let c2 = xexprconstr t2 rhoV rhoU rhoB rhoP in - mkApp(xexpr_binop, [| the_cstructure; rhoV; rhoU; rhoB; rhoP; xinterp g c1; xinterp g c2; natconstr i; c1; c2 |]) - | X_part (i,t,h) -> - let c = xexprconstr t rhoV rhoU rhoB rhoP in - mkApp(xexpr_part, [| the_cstructure; rhoV; rhoU; rhoB; rhoP; xinterp g c; natconstr i; c; h |]) - | X_int i -> mkApp(xexpr_int, [| the_cstructure; rhoV; rhoU; rhoB; rhoP; intconstr i |]) - | X_plus (t1,t2) -> - let c1 = xexprconstr t1 rhoV rhoU rhoB rhoP - and c2 = xexprconstr t2 rhoV rhoU rhoB rhoP in - mkApp(xexpr_plus, [| the_cstructure; rhoV; rhoU; rhoB; rhoP; - xinterp g c1; xinterp g c2; c1; c2 |]) - | X_mult (t1,t2) -> - let c1 = xexprconstr t1 rhoV rhoU rhoB rhoP - and c2 = xexprconstr t2 rhoV rhoU rhoB rhoP in - mkApp(xexpr_mult, [| the_cstructure; rhoV; rhoU; rhoB; rhoP; - xinterp g c1; xinterp g c2; c1; c2 |]) - | X_div (t1,t2,nz) -> - let c1 = xexprconstr t1 rhoV rhoU rhoB rhoP - and c2 = xexprconstr t2 rhoV rhoU rhoB rhoP in - mkApp(xexpr_div, [| the_cstructure; rhoV; rhoU; rhoB; rhoP; - xinterp g c1; xinterp g c2; c1; c2; nz |]) - | X_zero -> - mkApp(xexpr_zero, [| the_cstructure; rhoV; rhoU; rhoB; rhoP |]) - | X_one -> - mkApp(xexpr_one, [| the_cstructure; rhoV; rhoU; rhoB; rhoP |]) - | X_nat i -> - mkApp(xexpr_nat, [| the_cstructure; rhoV; rhoU; rhoB; rhoP; natconstr i |]) - | X_inv (t1) -> - let c1 = xexprconstr t1 rhoV rhoU rhoB rhoP in - mkApp(xexpr_inv, [| the_cstructure; rhoV; rhoU; rhoB; rhoP; xinterp g c1; c1 |]) - | X_minus (t1,t2) -> - let c1 = xexprconstr t1 rhoV rhoU rhoB rhoP - and c2 = xexprconstr t2 rhoV rhoU rhoB rhoP in - mkApp(xexpr_minus, [| the_cstructure; rhoV; rhoU; rhoB; rhoP; - xinterp g c1; xinterp g c2; c1; c2 |]) - | X_power (t1,n) -> - let c1 = xexprconstr t1 rhoV rhoU rhoB rhoP in - mkApp(xexpr_power, [| the_cstructure; rhoV; rhoU; rhoB; rhoP; - xinterp g c1; c1; natconstr n |]) in - - let rec valconstr e ta = - match e with - [] -> mk_lambda Anonymous nat_nat - (mk_cast (mkApp(csg_unit, [|the_cmonoid |])) ta) - | [c] -> mk_lambda Anonymous nat_nat c - | c::f -> mk_lambda (Name (id_of_string "n")) nat_nat - (mk_case nat_info ta (mkRel 1) [| c; valconstr f ta |]) in - - let rec unconstr e ta = - match e with - [] -> mk_lambda Anonymous nat_nat - (mk_cast (mkApp(id_un_op, [|the_csetoid |])) ta) - | [c] -> mk_lambda Anonymous nat_nat c - | c::f -> mk_lambda (Name (id_of_string "n")) nat_nat - (mk_case nat_info ta (mkRel 1) [| c; unconstr f ta |]) in - - let rec binconstr e ta = - match e with - [] -> mk_lambda Anonymous nat_nat - (mk_cast (mkApp(cs_binproj1, [|the_csetoid |])) ta) - | [c] -> mk_lambda Anonymous nat_nat c - | c::f -> mk_lambda (Name (id_of_string "n")) nat_nat - (mk_case nat_info ta (mkRel 1) [| c; binconstr f ta |]) in - - let rec funconstr e ta = - match e with - [] -> mk_lambda Anonymous nat_nat - (mk_cast (mkApp(fid, [|the_csetoid |])) ta) - | [c] -> mk_lambda Anonymous nat_nat c - | c::f -> mk_lambda (Name (id_of_string "n")) nat_nat - (mk_case nat_info ta (mkRel 1) [| c; funconstr f ta |]) in - - let rec printval i e = - match e with - [] -> () - | c::f -> - msgnl (str "(" ++ int i ++ str ") -> " ++ prterm c); - printval (i + 1) f in - - let report g fV fU fB fP a xleft xright rhoV rhoU rhoB rhoP = - (let left = - pf_nf_betadeltaiota g - (mkApp(xforget, [| the_cstructure; rhoV; rhoU; rhoB; rhoP; xinterp g xleft; xleft |])) - and right = - pf_nf_betadeltaiota g - (mkApp(xforget, [| the_cstructure; rhoV; rhoU; rhoB; rhoP; xinterp g xright; xright |])) - in - let nleft = - pf_cbv_betadeltaiota g (mkApp(norm, [| left |])) - and nright = - pf_cbv_betadeltaiota g (mkApp(norm, [| right |])) - in - msgnl (mt ()); printval 0 fV; msgnl (mt ()); - msgnl (mt ()); printval 0 fU; msgnl (mt ()); - msgnl (mt ()); printval 0 fB; msgnl (mt ()); - msgnl (mt ()); printval 0 fP; msgnl (mt ()); - msgnl (prterm a.(1)); - msgnl ( prterm left ); - msgnl ( prterm nleft ++ fnl ()); - msgnl ( prterm a.(2) ); - msgnl ( prterm right ); - msgnl ( prterm nright ++ fnl ()); - if the_suffix = "F" then - let difference = - (pf_cbv_betadeltaiota g - (mkApp(norm, [| mkApp(expr_minus, [| left; right |]) |]))) in - msgnl ( prterm difference ++ fnl ()) - else ()) - in - - let ta = pf_type_of g a.(1) in - let fleft = a.(1) and fright = a.(2) in - let (l,eV,eU,eB,eP) = lift (fleft,[],[],[],[]) in - let (r,fV,fU,fB,fP) = lift (fright,eV,eU,eB,eP) in - let rhoV = valconstr fV ta in - let rhoU = unconstr fU (mkApp(csetoid_un_op, [|the_csetoid|])) in - let rhoB = binconstr fB (mkApp(csetoid_bin_op, [|the_csetoid|])) in - let rhoP = funconstr fP (mkApp(partFunct, [|the_csetoid|])) in - let xleft = xexprconstr l rhoV rhoU rhoB rhoP - and xright = xexprconstr r rhoV rhoU rhoB rhoP in - if verbose then - report g fV fU fB fP a xleft xright rhoV rhoU rhoB rhoP; - let term = - mkApp(tactic_lemma, - [| the_cstructure; rhoV; rhoU; rhoB; rhoP; fleft; fright; xleft; xright; - mkApp(refl_equal, [| bool_bool; bool_true |]) |]) - in - let result = - try - exact_check term g - with e when Logic.catchable_exception e -> error "cannot establish equality" - in - if verbose then msgnl (str "end Rational"); - result - - -let hrational verbose g = - - let cs_eq = constant_algebra "CSetoids.cs_eq" in - - let c = strip_outer_cast (pf_concl g) in - if isApp c & eq_constr (hd_app c) cs_eq then - let a = args_app c in - if Array.length a > 2 then - xrational verbose g a - else error "not an [=] equation" - else error "not an [=] equation" - -let hrational1 verbose g = - if verbose then msgnl (str "begin Rational"); - hrational verbose g - -TACTIC EXTEND Rational -| ["Rational"] -> [ hrational1 false ] -END - -TACTIC EXTEND RationalVerbose -| ["Rational" "Verbose"] -> [ hrational1 true ] -END From 8518e5c2c30d1bfb97679729934119d6fb32114b Mon Sep 17 00:00:00 2001 From: Guillaume Claret Date: Thu, 25 Sep 2014 18:16:26 +0200 Subject: [PATCH 08/20] SConstruct is back --- SConstruct | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 SConstruct diff --git a/SConstruct b/SConstruct new file mode 100644 index 00000000..a15ace63 --- /dev/null +++ b/SConstruct @@ -0,0 +1,39 @@ +import os, glob, string + +# Removing examples directory since we do not need it every time. +dirs_to_compile = ['algebra', 'complex', 'coq_reals', 'fta', 'ftc', 'logic', 'metrics', 'model', 'raster', 'reals', 'tactics', 'transc', 'order', 'metric2', 'Liouville', 'stdlib_omissions', 'util', 'classes', 'ode'] + +nodes = map(lambda x: './' + x, dirs_to_compile) +dirs = [] +vs = [] + +env = DefaultEnvironment(ENV = os.environ, tools=['default', 'Coq']) + +while nodes: + node = nodes.pop() + b = os.path.basename(node) + if (node.endswith('.v') + and not b.startswith('Opaque_') + and not b.startswith('Transparent_')): + vs += [File(node)] + if os.path.isdir(node): + dirs += [node] + nodes += glob.glob(node + '/*') + +includes = ' '.join(map(lambda x: '-I ' + x, dirs[1:])) +Rs = '-R . CoRN' +coqcmd = 'coqc ${str(SOURCE)[:-2]} ' + Rs + +env['COQFLAGS'] = Rs + +for node in vs: env.Coq(node, COQCMD=coqcmd) + +os.system('coqdep ' + ' '.join(map(str, vs)) + ' ' + includes + ' ' + Rs + ' > deps') +ParseDepends('deps') + +open('coqidescript', 'w').write('#!/bin/sh\ncoqide ' + Rs + ' $@ \n') +os.chmod('coqidescript', 0755) + +env.CoqDoc(env.Dir('coqdoc'), vs, COQDOCFLAGS='-utf8 --toc -g --no-lib-name --coqlib http://coq.inria.fr/library') + +#env.Command('deps.dot', [], 'tools/DepsToDot.hs < deps > $TARGET') \ No newline at end of file From d89f0da38f6ed27af08a2d91f047be298a0e6a0c Mon Sep 17 00:00:00 2001 From: Guillaume Claret Date: Thu, 25 Sep 2014 18:17:49 +0200 Subject: [PATCH 09/20] Required old file added back --- old/Transparent_algebra.v | 60 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 old/Transparent_algebra.v diff --git a/old/Transparent_algebra.v b/old/Transparent_algebra.v new file mode 100644 index 00000000..3f917127 --- /dev/null +++ b/old/Transparent_algebra.v @@ -0,0 +1,60 @@ +(* Copyright © 1998-2006 + * Henk Barendregt + * Luís Cruz-Filipe + * Herman Geuvers + * Mariusz Giero + * Rik van Ginneken + * Dimitri Hendriks + * Sébastien Hinderer + * Bart Kirkels + * Pierre Letouzey + * Iris Loeb + * Lionel Mamane + * Milad Niqui + * Russell O’Connor + * Randy Pollack + * Nickolay V. Shmyrev + * Bas Spitters + * Dan Synek + * Freek Wiedijk + * Jan Zwanenburg + * + * This work is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This work is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this work; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + *) + +Transparent cs_crr. +Transparent csg_crr. +Transparent cm_crr. +Transparent cg_crr. +Transparent cr_crr. +Transparent cf_crr. + +Transparent csf_fun. +Transparent csbf_fun. +Transparent csr_rel. + +Transparent cs_eq. +Transparent cs_neq. +Transparent cs_ap. +Transparent cm_unit. +Transparent csg_op. +Transparent cg_inv. +Transparent cg_minus. +Transparent cr_one. +Transparent cr_mult. + +Transparent nexp_op. +Transparent cf_div. + From 0da96ae5eea65b05c6bfea89c0df451cbeacca7a Mon Sep 17 00:00:00 2001 From: Guillaume Claret Date: Thu, 25 Sep 2014 18:22:07 +0200 Subject: [PATCH 10/20] The configure generate Make using find --- .gitignore | 1 + Make | 358 --------------------------------------------------- Make.in | 4 + configure.sh | 2 + 4 files changed, 7 insertions(+), 358 deletions(-) delete mode 100644 Make create mode 100644 Make.in diff --git a/.gitignore b/.gitignore index 71be1a78..32cbb597 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +Make Makefile Makefile.bak *.vo diff --git a/Make b/Make deleted file mode 100644 index 32340774..00000000 --- a/Make +++ /dev/null @@ -1,358 +0,0 @@ -# Library name --R . CoRN - -# Coq files -algebra/Bernstein.v -algebra/CFields.v -algebra/COrdCauchy.v -algebra/CPoly_ApZero.v -algebra/CRing_as_Ring.v -algebra/CSetoidFun.v -algebra/Expon.v -algebra/CAbGroups.v -algebra/CGroups.v -algebra/COrdFields2.v -algebra/CPoly_Degree.v -algebra/CRing_Homomorphisms.v -algebra/CSetoidInc.v -algebra/OperationClasses.v -algebra/CAbMonoids.v -algebra/CMonoids.v -algebra/COrdFields.v -algebra/CPolynomials.v -algebra/CRings.v -algebra/CSetoids.v -algebra/RSetoid.v -algebra/Cauchy_COF.v -algebra/COrdAbs.v -algebra/CornScope.v -algebra/CPoly_NthCoeff.v -algebra/CSemiGroups.v -algebra/CSums.v - -classes/Qclasses.v -classes/Qposclasses.v - -complex/AbsCC.v -complex/CComplex.v -complex/Complex_Exponential.v -complex/NRootCC.v - -coq_reals/Rreals_iso.v -coq_reals/Rreals.v -coq_reals/Rsign.v - -# examples/Calculemus2011.v -# examples/Circle.v -# examples/IntegrationExamples.v -# examples/LMCS2011.v -# examples/PlotExamples.v -# examples/RealFaster.v -# examples/RealFast.v - -fta/CC_Props.v -fta/CPoly_Contin1.v -fta/CPoly_Rev.v -fta/CPoly_Shift.v -fta/FTAreg.v -fta/FTA.v -fta/KeyLemma.v -fta/KneserLemma.v -fta/MainLemma.v - -ftc/CalculusTheorems.v -ftc/Composition.v -ftc/Continuity.v -ftc/COrdLemmas.v -ftc/DerivativeOps.v -ftc/Derivative.v -ftc/Differentiability.v -ftc/FTC.v -ftc/FunctSequence.v -ftc/FunctSeries.v -ftc/FunctSums.v -ftc/Integral.v -ftc/IntegrationRules.v -ftc/IntervalFunct.v -ftc/MoreFunctions.v -ftc/MoreFunSeries.v -ftc/MoreIntegrals.v -ftc/MoreIntervals.v -ftc/NthDerivative.v -ftc/PartFunEquality.v -ftc/PartInterval.v -ftc/Partitions.v -ftc/RefLemma.v -ftc/RefSeparated.v -ftc/RefSeparating.v -ftc/RefSepRef.v -ftc/Rolle.v -ftc/StrongIVT.v -ftc/TaylorLemma.v -ftc/Taylor.v -ftc/WeakIVT.v - -logic/Classic.v -logic/CLogic.v -logic/CornBasics.v -logic/PropDecid.v -logic/Stability.v - -metric2/Classification.v -metric2/Compact.v -metric2/CompletePointFree.v -metric2/CompleteProduct.v -metric2/Complete.v -metric2/DistanceMetricSpace.v -metric2/FinEnum.v -metric2/Graph.v -metric2/Hausdorff.v -metric2/Limit.v -metric2/MetricMorphisms.v -metric2/Metric.v -metric2/Prelength.v -metric2/ProductMetric.v -metric2/StepFunctionMonad.v -metric2/StepFunctionSetoid.v -metric2/StepFunction.v -metric2/UCFnMonoid.v -metric2/UniformContinuity.v - -metrics/CMetricSpaces.v -metrics/ContFunctions.v -metrics/CPMSTheory.v -metrics/CPseudoMSpaces.v -metrics/Equiv.v -metrics/IR_CPMSpace.v -metrics/LipExt.v -metrics/Prod_Sub.v - -model/abgroups/CRabgroup.v -model/abgroups/Qabgroup.v -model/abgroups/Qposabgroup.v -model/abgroups/QSposabgroup.v -model/abgroups/Zabgroup.v - -model/fields/CRfield.v -model/fields/Qfield.v - -model/groups/CRgroup.v -model/groups/Qgroup.v -model/groups/Qposgroup.v -model/groups/QSposgroup.v -model/groups/Zgroup.v - -model/lattice/CRlattice.v - -model/metric2/BoundedFunction.v -model/metric2/CRmetric.v -model/metric2/IntegrableFunction.v -model/metric2/L1metric.v -model/metric2/LinfDistMonad.v -model/metric2/LinfMetricMonad.v -model/metric2/LinfMetric.v -model/metric2/Qmetric.v - -model/monoids/CRmonoid.v -model/monoids/freem_to_Nm.v -model/monoids/Nmonoid.v -model/monoids/Nm_to_cycm.v -model/monoids/Nm_to_freem.v -model/monoids/Nposmonoid.v -model/monoids/Qmonoid.v -model/monoids/Qposmonoid.v -model/monoids/QSposmonoid.v -model/monoids/Zmonoid.v - -model/ordfields/CRordfield.v -model/ordfields/Qordfield.v - -model/partialorder/CRpartialorder.v - -model/reals/Cauchy_IR.v -model/reals/CRreal.v - -model/rings/CRring.v -model/rings/Qring.v -model/rings/Zring.v - -model/semigroups/CRsemigroup.v -model/semigroups/Npossemigroup.v -model/semigroups/Nsemigroup.v -model/semigroups/Qpossemigroup.v -model/semigroups/Qsemigroup.v -model/semigroups/QSpossemigroup.v -model/semigroups/Zsemigroup.v - -model/setoids/CRsetoid.v -model/setoids/decsetoid.v -model/setoids/Nfinsetoid.v -model/setoids/Npossetoid.v -model/setoids/Nsetoid.v -model/setoids/Qpossetoid.v -model/setoids/Qsetoid.v -model/setoids/Zfinsetoid.v -model/setoids/Zsetoid.v - -model/structures/NNUpperR.v -model/structures/Npossec.v -model/structures/Nsec.v -model/structures/OpenUnit.v -model/structures/Qinf.v -model/structures/QnnInf.v -model/structures/QnonNeg.v -model/structures/QposInf.v -model/structures/Qpossec.v -model/structures/Qsec.v -model/structures/StepQsec.v -model/structures/Zsec.v - -model/totalorder/QMinMax.v -model/totalorder/QposMinMax.v -model/totalorder/ZMinMax.v - -model/Zmod/Cmod.v -model/Zmod/IrrCrit.v -model/Zmod/ZBasics.v -model/Zmod/ZDivides.v -model/Zmod/ZGcd.v -model/Zmod/ZMod.v -model/Zmod/Zm.v - -ode/AbstractIntegration.v -ode/BanachFixpoint.v -ode/FromMetric2.v -ode/metric.v -ode/Picard.v -ode/SimpleIntegration.v - -order/Lattice.v -order/PartialOrder.v -order/SemiLattice.v -order/TotalOrder.v - -raster/Raster.v - -reals/Bridges_iso.v -reals/Bridges_LUB.v -reals/Cauchy_CReals.v -reals/CauchySeq.v -reals/Cesaro.v -reals/CMetricFields.v -reals/CPoly_Contin.v -reals/CReals1.v -reals/CReals.v -reals/CSumsReals.v -reals/fast -reals/faster -reals/Intervals.v -reals/iso_CReals.v -reals/IVT.v -reals/Max_AbsIR.v -reals/NRootIR.v -reals/OddPolyRootIR.v -reals/PosSeq.v -reals/Q_dense.v -reals/Q_in_CReals.v -reals/RealCount.v -reals/RealFuncts.v -reals/RealLists.v -reals/R_morphism.v -reals/Series.v - -reals/fast/Compress.v -reals/fast/ContinuousCorrect.v -reals/fast/CRabs.v -reals/fast/CRAlternatingSum.v -reals/fast/CRarctan_small.v -reals/fast/CRarctan.v -reals/fast/CRArith.v -reals/fast/CRartanh_slow.v -reals/fast/CRball.v -reals/fast/CRconst.v -reals/fast/CRcorrect.v -reals/fast/CRcos.v -reals/fast/CRexp.v -reals/fast/CRFieldOps.v -reals/fast/CRGeometricSum.v -reals/fast/CRGroupOps.v -reals/fast/CRIR.v -reals/fast/CRln.v -reals/fast/CRpi_fast.v -reals/fast/CRpi_slow.v -reals/fast/CRpi.v -reals/fast/CRpower.v -reals/fast/CRroot.v -reals/fast/CRseries.v -reals/fast/CRsign.v -reals/fast/CRsin.v -reals/fast/CRsum.v -reals/fast/CRtrans.v -reals/fast/Integration.v -reals/fast/Interval.v -reals/fast/LazyNat.v -reals/fast/ModulusDerivative.v -reals/fast/MultivariatePolynomials.v -reals/fast/Plot.v -reals/fast/PowerBound.v -reals/fast/RasterizeQ.v -reals/fast/RasterQ.v -reals/fast/uneven_CRplus.v - -reals/faster/ApproximateRationals.v -reals/faster/AQmetric.v -reals/faster/ARAlternatingSum.v -reals/faster/ARarctan_small.v -reals/faster/ARarctan.v -reals/faster/ARArith.v -reals/faster/ARbigD.v -reals/faster/ARbigQ.v -reals/faster/ARcos.v -reals/faster/ARexp.v -reals/faster/ARpi.v -reals/faster/ARQ.v -reals/faster/ARroot.v -reals/faster/ARsign.v -reals/faster/ARsin.v -reals/faster/ARtrans.v - -stdlib_omissions/List.v -stdlib_omissions/N.v -stdlib_omissions/Pair.v -stdlib_omissions/P.v -stdlib_omissions/Q.v -stdlib_omissions/Z.v - -tactics/AlgReflection.v -tactics/CornTac.v -tactics/csetoid_rewrite.v -tactics/DiffTactics1.v -tactics/DiffTactics2.v -tactics/DiffTactics3.v -tactics/FieldReflection.v -# tactics/Opaque_algebra.v -tactics/Qauto.v -tactics/rational.ml -tactics/Rational.v -tactics/RingReflection.v -tactics/Step.v - -transc/ArTanH.v -transc/Exponential.v -transc/InvTrigonom.v -transc/MoreArcTan.v -transc/Pi.v -transc/PowerSeries.v -transc/RealPowers.v -transc/SinCos.v -transc/TaylorSeries.v -transc/TrigMon.v -transc/Trigonometric.v - -util/Container.v -util/Extract.v -util/PointFree.v -util/Qdlog.v -util/Qgcd.v -util/Qsums.v -util/SetoidPermutation.v \ No newline at end of file diff --git a/Make.in b/Make.in new file mode 100644 index 00000000..7571e088 --- /dev/null +++ b/Make.in @@ -0,0 +1,4 @@ +# Library name +-R . CoRN + +# Coq files diff --git a/configure.sh b/configure.sh index b9d12ab6..786bfdfc 100755 --- a/configure.sh +++ b/configure.sh @@ -1,2 +1,4 @@ #!/usr/bin/env sh +cp -f Make.in Make +find algebra complex coq_reals fta ftc logic metrics model raster reals tactics transc order metric2 stdlib_omissions util classes ode -name "*.v" |grep -v tactics/Opaque_algebra.v >>Make coq_makefile -f Make -o Makefile \ No newline at end of file From efb6acd9cd20afad4d3bdb0b958cc972fcbc2a52 Mon Sep 17 00:00:00 2001 From: Abhishek Anand Date: Mon, 29 Dec 2014 19:08:08 -0500 Subject: [PATCH 11/20] added the Weak_IVTQ lemma which is a stronger variant of CoRN.ftc.StrongIVT.Weak_IVT --- ftc/WeakIVTQ.v | 199 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 199 insertions(+) create mode 100644 ftc/WeakIVTQ.v diff --git a/ftc/WeakIVTQ.v b/ftc/WeakIVTQ.v new file mode 100644 index 00000000..a5ed7cf5 --- /dev/null +++ b/ftc/WeakIVTQ.v @@ -0,0 +1,199 @@ +(** Author : Abhishek Anand ( http://www.cs.cornell.edu/~aa755/ ) +*) + +Require Export CoRN.ftc.FTC. + +Definition Q2R (q: Q) : IR := (inj_Q IR q). +Coercion Q2R : Q >-> st_car. + + +Require Import Ring. +Require Import CoRN.tactics.CornTac. +Require Import CoRN.algebra.CRing_as_Ring. + +Add Ring IRisaRing: (CRing_Ring IR). + +Require Export CoRN.ftc.Derivative. +Require Export CoRN.ftc.Integral. +Lemma shift_zeroR_leEq_minus : + forall ft fq : IR, ft[<=]fq -> ft[-]fq[<=][0]. +Proof. + intros ? ? Hle. + apply shift_minus_leEq. + ring_simplify. + trivial. +Qed. + +Hint Resolve less_leEq_trans leEq_less_trans plus_resp_less_leEq +plus_resp_leEq_less minus_resp_less_leEq plus_resp_pos_nonneg +leEq_inj_Q leEq_wdr leEq_wdr leEq_reflexive eq_imp_leEq +leEq_imp_eq leEq_imp_eq leEq_transitive (leEq_inj_Q IR) less_leEq +Min_leEq_rht Min_leEq_lft +shift_zero_leEq_minus shift_minus_leEq shift_zeroR_leEq_minus +pos_two rht_leEq_Max +lft_leEq_Max: CoRN. + +Hint Immediate eq_reflexive_unfolded : CoRN. + +Lemma ltAddRhs : +forall (a b : IR), + [0][<]b -> a[<]a[+]b. + intros ? ? Hlt. + pose proof (leEq_reflexive _ a) as Hr. + apply (plus_resp_less_leEq _ _ _ _ _ Hlt) in Hr. + eapply less_wdl in Hr;[|apply cm_lft_unit_unfolded]. + eapply less_wdr;[| apply cag_commutes_unfolded]. + trivial. +Qed. + +Lemma closeRationalR : forall (a b t d : IR) (Hab : a [<=] b), + Compact Hab t + -> t[<]b + -> [0][<]d + -> {q : Q | Compact Hab q /\ + AbsIR (t[-]q)[<=]d}. +Proof. + intros ? ? ? ? ? p Hcc Hdp. + pose proof (less_Min _ _ _ (ltAddRhs t d Hdp) Hcc) as Hmlt. + pose proof (Q_dense_in_CReals' _ _ _ Hmlt) as Hqr. + destruct Hqr as [q Hqr Hql]. + exists q. + simpl in p. unfold Q2R in p. destruct p as [pl pr]. + assert ( a[<=]inj_Q IR q) as Haq by (eauto using + less_leEq, leEq_less_trans). + assert (inj_Q IR q[<=] b) as Hqb by (eauto using + less_leEq, + less_leEq_trans, + Min_leEq_rht). + split;[exact (Haq,Hqb)|]. + rewrite AbsIR_minus. unfold Q2R. + rewrite AbsIR_eq_x;[|eauto 4 using + shift_zero_leEq_minus, less_leEq]. + apply shift_minus_leEq. + rewrite cag_commutes_unfolded. + eauto using + less_leEq,leEq_less_trans,leEq_reflexive, + less_leEq_trans,Min_leEq_lft. +Defined. + +Lemma ltMinusRhs: + forall (x y: IR), + [0] [<]y -> x[-]y[<]x. +Proof. + intros. + apply shift_minus_less. + apply ltAddRhs; auto. +Qed. + + + +Lemma closeRationalL : forall (a b t d : IR) (Hab : a [<=] b), + Compact Hab t + -> a[<]t + -> [0][<]d + -> {q : Q | Compact Hab q /\ + AbsIR (t[-]q)[<=]d}. +Proof. + intros ? ? ? ? ? p Hcc Hdp. + pose proof (Max_less _ _ _ (ltMinusRhs _ d Hdp) Hcc) as Hmlt. + pose proof (Q_dense_in_CReals' _ _ _ Hmlt) as Hqr. + destruct Hqr as [q Hqr Hql]. + exists q. + simpl in p. unfold Q2R in p. destruct p as [pl pr]. + assert (inj_Q IR q[<=] b) as Hqb by (eauto using + less_leEq, less_leEq_trans). + assert (a[<=] inj_Q IR q) as Haq by (eauto using + less_leEq, + less_leEq_trans, + leEq_less_trans, + rht_leEq_Max). + split;[exact (Haq,Hqb)|]. + rewrite AbsIR_eq_x;[|eauto 4 using + shift_zero_leEq_minus, less_leEq]. + apply shift_minus_leEq. + apply shift_leEq_plus'. + unfold Q2R. + pose proof (lft_leEq_Max (t[-]d) a). + apply less_leEq. + eapply leEq_less_trans; eauto. +Qed. + + +Require Export CoRN.ftc.StrongIVT. + +Lemma closeRationalLR : forall (a b x d : IR) (Hab : a [<] b), + (Compact (less_leEq _ _ _ Hab)) x + -> [0][<]d + -> {q : Q | (Compact (less_leEq _ _ _ Hab)) q /\ + AbsIR (x[-]q)[<=]d}. +Proof. + intros ? ? ? ? ? Hcc Hdp. + pose proof Hab as Hap. + apply less_cotransitive_unfolded with (z:=x)in Hap. + destruct Hap as [Hlt | Hgt]. +- apply closeRationalL; auto. +- apply closeRationalR; auto. +Qed. + +(** this lemma is stronger than Weak_IVT. the only change + is that the type of [x] (in the concluion) + is Q, instead of IR *) +Lemma Weak_IVTQ + : forall (I : interval) (F : PartFunct IR), + Continuous I F -> + forall (a b : IR) (Ha : Dom F a) (Hb : Dom F b) + (HFab : F a Ha[<]F b Hb), + I a -> + I b -> + forall e : IR, + [0][<]e -> + forall y : IR, + Compact (less_leEq IR (F a Ha) (F b Hb) HFab) y -> + {x : Q | Compact (Min_leEq_Max a b) x /\ + forall Hx : Dom F x, AbsIR (F x Hx[-]y)[<=]e}. +Proof. + intros ? ? Hc ? ? ? ? ? Hia Hib ? He ? Hcp. + apply pos_div_two in He. + pose proof He as Hivt. + eapply Weak_IVT with (y:=y) (F:=F) (HFab := HFab) in Hivt; + eauto. + unfold compact in He. + unfold Continuous in Hc. + destruct Hc as [Hcl Hcr]. + specialize (Hcr _ _ (Min_leEq_Max a b)). + unfold Continuous_I in Hcr. + match type of Hcr with + ?A -> _ => assert A as H99 by (apply included_interval; auto); + pose proof (included_trans _ _ _ _ H99 Hcl) as Hdom; + specialize (Hcr H99); clear H99 + end. + + apply snd in Hcr. + specialize (Hcr _ He). + destruct Hcr as [d Hdp Hcc]. + destruct Hivt as [x Hmm Hfx]. + pose proof HFab as Hap. + specialize (fun xp => Hcc x xp Hmm). + (* y already names a point in the co-domain *) + apply less_imp_ap in Hap. + apply pfstrx in Hap. + apply ap_imp_Min_less_Max in Hap. + pose proof (closeRationalLR _ _ _ _ Hap Hmm Hdp) as Hqq. + destruct Hqq as [q H99]. + exists q. + destruct H99 as [Hcomp Hab]. + split;[exact Hcomp|]. + specialize (Hcc q Hcomp (Hdom _ Hmm) (Hdom _ Hcomp) Hab). + specialize (Hfx (Hdom _ Hmm)). + rewrite AbsIR_minus in Hcc. + apply AbsIR_imp_AbsSmall in Hcc. + apply AbsIR_imp_AbsSmall in Hfx. + pose proof (AbsSmall_eps_div_two _ _ _ _ Hcc Hfx) as Hsum. + clear Hfx Hcc. + unfold cg_minus in Hsum. + ring_simplify in Hsum. + intros Hx. + apply AbsSmall_imp_AbsIR. + rewrite pfwdef with (Hy := Hx) in Hsum; trivial. + apply eq_reflexive. +Qed. From 294cf54ef960ee2399f6ea4420c1952e5d55fcfc Mon Sep 17 00:00:00 2001 From: Abhishek Anand Date: Mon, 29 Dec 2014 19:39:06 -0500 Subject: [PATCH 12/20] removed some unnecessary hints and lemmas --- ftc/WeakIVTQ.v | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/ftc/WeakIVTQ.v b/ftc/WeakIVTQ.v index a5ed7cf5..3976db47 100644 --- a/ftc/WeakIVTQ.v +++ b/ftc/WeakIVTQ.v @@ -15,25 +15,7 @@ Add Ring IRisaRing: (CRing_Ring IR). Require Export CoRN.ftc.Derivative. Require Export CoRN.ftc.Integral. -Lemma shift_zeroR_leEq_minus : - forall ft fq : IR, ft[<=]fq -> ft[-]fq[<=][0]. -Proof. - intros ? ? Hle. - apply shift_minus_leEq. - ring_simplify. - trivial. -Qed. - -Hint Resolve less_leEq_trans leEq_less_trans plus_resp_less_leEq -plus_resp_leEq_less minus_resp_less_leEq plus_resp_pos_nonneg -leEq_inj_Q leEq_wdr leEq_wdr leEq_reflexive eq_imp_leEq -leEq_imp_eq leEq_imp_eq leEq_transitive (leEq_inj_Q IR) less_leEq -Min_leEq_rht Min_leEq_lft -shift_zero_leEq_minus shift_minus_leEq shift_zeroR_leEq_minus -pos_two rht_leEq_Max -lft_leEq_Max: CoRN. -Hint Immediate eq_reflexive_unfolded : CoRN. Lemma ltAddRhs : forall (a b : IR), From 0146ce7de84120f5d9f5d9202790738d43c462fd Mon Sep 17 00:00:00 2001 From: Abhishek Anand Date: Fri, 9 Jan 2015 15:28:21 -0500 Subject: [PATCH 13/20] added a simple lemma stating convexity of [interval]s --- ftc/MoreIntervals.v | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/ftc/MoreIntervals.v b/ftc/MoreIntervals.v index 502882dd..88052880 100644 --- a/ftc/MoreIntervals.v +++ b/ftc/MoreIntervals.v @@ -312,6 +312,19 @@ Proof. split; [ apply leEq_transitive with a | apply leEq_transitive with b ]; auto. Qed. +(** This lemma is almost same as [compact_included] above, except + that it gets rid of the hypothesis [Hab : a [<=] b] *) +Lemma interval_convex: + forall (a b : IR) (I : interval), + I a -> I b -> included (clcr a b) I. +Proof. + intros ? ? ? Ha Hb. unfold included. intros x Hab. + simpl in Hab. destruct Hab as [Hab Habr]. + destruct I; simpl in Ha, Hb; simpl; try (split; destruct Ha, Hb); + eauto using leEq_less_trans, leEq_reflexive, + less_leEq_trans, leEq_transitive. +Qed. + Lemma included_interval' : forall (I : interval) x y z w, I x -> I y -> I z -> I w -> forall H, included (compact (Min x z) (Max y w) H) I. Proof. From d829dc968878aee1bcf944ac470ac03fc3b670a5 Mon Sep 17 00:00:00 2001 From: Abhishek Anand Date: Fri, 9 Jan 2015 18:23:13 -0500 Subject: [PATCH 14/20] added 2 lemmas. Min and Max are contained in any interval containing the 2 arguments. --- ftc/MoreIntervals.v | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/ftc/MoreIntervals.v b/ftc/MoreIntervals.v index 88052880..3d321015 100644 --- a/ftc/MoreIntervals.v +++ b/ftc/MoreIntervals.v @@ -325,6 +325,30 @@ Proof. less_leEq_trans, leEq_transitive. Qed. +(** Classically, this is a trivial consequence of [interval_convex]. + However, a constructive proof seems to require a little more work*) +Lemma interval_Min: + forall {a b : IR} {I : interval}, + I a -> I b -> I (Min a b). +Proof. + intros ? ? ? Ha Hb. + destruct I; simpl in Ha, Hb; simpl; try (split; destruct Ha, Hb); + eauto using leEq_less_trans, leEq_reflexive, + leEq_transitive, + Min_leEq_lft, less_Min, leEq_Min. +Qed. + +Lemma interval_Max: + forall {a b : IR} {I : interval}, + I a -> I b -> I (Max a b). +Proof. + intros ? ? ? Ha Hb. + destruct I; simpl in Ha, Hb; simpl; try (split; destruct Ha, Hb); + eauto using less_leEq_trans, leEq_reflexive, + leEq_transitive, + lft_leEq_Max, Max_less, Max_leEq. +Qed. + Lemma included_interval' : forall (I : interval) x y z w, I x -> I y -> I z -> I w -> forall H, included (compact (Min x z) (Max y w) H) I. Proof. From e1f891d46492b60414cf03a7955ef3e162b36dbc Mon Sep 17 00:00:00 2001 From: Bas Spitters Date: Fri, 29 May 2015 12:53:44 +0200 Subject: [PATCH 15/20] Updating README, resolving #19 --- README | 18 ++++++++---------- ode/Picard.v | 4 ++-- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/README b/README index 6b3f4f8a..bd285ba8 100644 --- a/README +++ b/README @@ -8,24 +8,19 @@ This version of C-CoRN is known to compile with: - Coq 8.4pl4 - - SCons 1.2 + - SCons 1.2 or make GIT CHECKOUT & SUBMODULES ------------------------- C-CoRN depends on Math Classes, which is a library of abstract interfaces for mathematical structures that is heavily based on Coq's new type classes. -Math Classes is contained in the C-CoRN git repository as a submodule. You can -obtain math-classes automatically by giving the --recursive option when you -clone the git repository: - git clone --recursive https://github.com/c-corn/corn.git - -If you have already cloned the CoRN repository without --recursive, you can -still get the submodules with - - git submodule update --init --recursive +MathClasses can be installed using OPAM. +http://coq-blog.clarus.me/use-opam-for-coq.html +Or directly using from git: +https://github.com/math-classes/math-classes BUILDING C-CoRN --------------- @@ -47,6 +42,9 @@ For more information, see the SCons documentation at http://www.scons.org/ +Make is still supported. + + BUILDING DOCUMENTATION ---------------------- diff --git a/ode/Picard.v b/ode/Picard.v index 3d971867..101c1917 100644 --- a/ode/Picard.v +++ b/ode/Picard.v @@ -444,8 +444,8 @@ rewrite abs.abs_nonneg; [reflexivity |]. change (0 <= 1 # 2)%Q. auto with qarith. Qed. -(* -Time Compute answer 2 (` (picard_iter 3 half)). (* 10 minutes *) +(* native_compute needs 8.5 *) +Time Eval vm_compute in (answer 2 (` (picard_iter 2 half))). (* 10 minutes *) Time Compute answer 1 (` (f half)). (* Too long *) *) From e14d3b4773e284614d5d441b2ff52cde2d6ae320 Mon Sep 17 00:00:00 2001 From: Subramanian Mahadevan Date: Mon, 8 Jun 2015 10:33:31 +0530 Subject: [PATCH 16/20] minimal patch to compile CoRN on Mac following recent patch to MathClasses for case-sensitive file systems (https://github.com/math-classes/math-classes/commit/9330ab1133da24bcd2deee9e26ae27988b13c63a); minimal patch also applies to Windows; a more comprehensive fix with complete require paths like MathClasses may be preferable --- metric2/DistanceMetricSpace.v | 2 +- metric2/Hausdorff.v | 4 ++-- metric2/Limit.v | 4 ++-- metric2/UCFnMonoid.v | 2 +- model/structures/NNUpperR.v | 2 +- model/structures/QnonNeg.v | 2 +- model/structures/StepQsec.v | 2 +- reals/fast/CRAlternatingSum.v | 4 ++-- tactics/AlgReflection.v | 2 +- tactics/csetoid_rewrite.v | 2 +- 10 files changed, 13 insertions(+), 13 deletions(-) diff --git a/metric2/DistanceMetricSpace.v b/metric2/DistanceMetricSpace.v index 2ae27e1e..70c4855d 100644 --- a/metric2/DistanceMetricSpace.v +++ b/metric2/DistanceMetricSpace.v @@ -3,7 +3,7 @@ Require NNUpperR. Import NNUpperR.notations. Import QnonNeg.notations. -Require Import Metric. +Require Import CoRN.metric2.Metric. Open Scope NNUpperR_scope. diff --git a/metric2/Hausdorff.v b/metric2/Hausdorff.v index 2af04c9a..5c7a8585 100644 --- a/metric2/Hausdorff.v +++ b/metric2/Hausdorff.v @@ -20,9 +20,9 @@ CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) Require Import ZBasics. Require Import Classic. -Require Export Metric. +Require Export CoRN.metric2.Metric. Require Import Classification. -Require Import List. +Require Import Coq.Lists.List. Require Import ZArith. Require Import QMinMax. Require Import QposMinMax. diff --git a/metric2/Limit.v b/metric2/Limit.v index 812d45ad..cd21ffdb 100644 --- a/metric2/Limit.v +++ b/metric2/Limit.v @@ -20,9 +20,9 @@ CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) Require Import QArith. -Require Import Bool. +Require Import Coq.Bool.Bool. Require Export Complete. -Require Export Streams. +Require Export Coq.Lists.Streams. Require Import abstract_algebra theory.streams orders.naturals. (** diff --git a/metric2/UCFnMonoid.v b/metric2/UCFnMonoid.v index c66bc35b..2e66c8c3 100644 --- a/metric2/UCFnMonoid.v +++ b/metric2/UCFnMonoid.v @@ -1,4 +1,4 @@ -Require Import Utf8 Streams UniformContinuity abstract_algebra. +Require Import Utf8 Coq.Lists.Streams UniformContinuity abstract_algebra. (** Uniform continuous maps from a metric space to itself (endomaps) diff --git a/model/structures/NNUpperR.v b/model/structures/NNUpperR.v index 078d2951..6f32f84d 100644 --- a/model/structures/NNUpperR.v +++ b/model/structures/NNUpperR.v @@ -1,7 +1,7 @@ (* This module is designed to *not* be Import'ed, only Require'd. *) Require Import - Qabs Qordfield Qpossec Qminmax Ring Program. + Qabs Qordfield Qpossec Coq.QArith.Qminmax Ring Program. Require QnonNeg. Import QnonNeg.notations. diff --git a/model/structures/QnonNeg.v b/model/structures/QnonNeg.v index f45408fd..58eb3c34 100644 --- a/model/structures/QnonNeg.v +++ b/model/structures/QnonNeg.v @@ -1,6 +1,6 @@ (* This module is designed to *not* be Import'ed, only Require'd. *) -Require Import Program Qpossec QposInf Qminmax. +Require Import Program Qpossec QposInf Coq.QArith.Qminmax. Set Automatic Introduction. diff --git a/model/structures/StepQsec.v b/model/structures/StepQsec.v index ec719eb4..2c9f9ab8 100644 --- a/model/structures/StepQsec.v +++ b/model/structures/StepQsec.v @@ -2,7 +2,7 @@ Require Import Qmetric. Require Export QArith. Require Export StepFunctionSetoid. Require Import Qabs. -Require Import Bool. +Require Import Coq.Bool.Bool. Require Import CornTac. Require Import CornBasics. Require Import RSetoid. diff --git a/reals/fast/CRAlternatingSum.v b/reals/fast/CRAlternatingSum.v index 9f1c7395..79c6863c 100644 --- a/reals/fast/CRAlternatingSum.v +++ b/reals/fast/CRAlternatingSum.v @@ -24,7 +24,7 @@ Require Import Q_in_CReals. Require Import ArithRing. Require Export CRArith. Require Import CRIR. -Require Import Bool. +Require Import Coq.Bool.Bool. Require Import COrdAbs. Require Import Qordfield. Require Export Qmetric. @@ -32,7 +32,7 @@ Require Import LazyNat. Require Export Limit. Require Import QposMinMax. Require Import Qpower. -Require Export Streams. +Require Export Coq.Lists.Streams. Require Import PowerSeries. Require Import CornTac. Require Import Qclasses. diff --git a/tactics/AlgReflection.v b/tactics/AlgReflection.v index 48186087..4a8facae 100644 --- a/tactics/AlgReflection.v +++ b/tactics/AlgReflection.v @@ -36,7 +36,7 @@ (* begin hide *) Require Export CLogic. -Require Export Bool. +Require Export Coq.Bool.Bool. Section Syntactic_Expressions. diff --git a/tactics/csetoid_rewrite.v b/tactics/csetoid_rewrite.v index 7df6f4fe..4c13b655 100644 --- a/tactics/csetoid_rewrite.v +++ b/tactics/csetoid_rewrite.v @@ -1305,7 +1305,7 @@ Ltac partial_setoid_replace_cxt x y h := (*End partial_csetoid_rewrite.*) -Require Export Bool. +Require Export Coq.Bool.Bool. Ltac term_cont_part t := match constr:t with From 00fe2f2c1a053d67aabe7e4de070634eb124b0da Mon Sep 17 00:00:00 2001 From: Guillaume Claret Date: Thu, 26 Nov 2015 18:10:46 +0100 Subject: [PATCH 17/20] README in MarkDown with OPAM instructions --- README | 51 --------------------------------------------------- README.md | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 51 deletions(-) delete mode 100644 README create mode 100644 README.md diff --git a/README b/README deleted file mode 100644 index bd285ba8..00000000 --- a/README +++ /dev/null @@ -1,51 +0,0 @@ -C-CoRN, the Coq Constructive Repository at Nijmegen ---------------------------------------------------- - -PREREQUISITES -------------- - -This version of C-CoRN is known to compile with: - - - Coq 8.4pl4 - - - SCons 1.2 or make - -GIT CHECKOUT & SUBMODULES -------------------------- - -C-CoRN depends on Math Classes, which is a library of abstract interfaces for -mathematical structures that is heavily based on Coq's new type classes. - -MathClasses can be installed using OPAM. -http://coq-blog.clarus.me/use-opam-for-coq.html - -Or directly using from git: -https://github.com/math-classes/math-classes - -BUILDING C-CoRN ---------------- - -C-CoRN uses SCons for its build infrastructure. SCons is a modern -Python-based Make-replacement. - -To build C-CoRN with SCons say "scons" to build the whole library, or -"scons some/module.vo" to just build some/module.vo (and its dependencies). - -In addition to common Make options like -j N and -k, SCons -supports some useful options of its own, such as --debug=time, which -displays the time spent executing individual build commands. - -scons -c replaces Make clean - -For more information, see the SCons documentation at - - http://www.scons.org/ - - -Make is still supported. - - -BUILDING DOCUMENTATION ----------------------- - -To build CoqDoc documentation, say "scons coqdoc". diff --git a/README.md b/README.md new file mode 100644 index 00000000..9df0d9a9 --- /dev/null +++ b/README.md @@ -0,0 +1,40 @@ +# C-CoRN +> The Coq Constructive Repository at Nijmegen. + +## Install with OPAM +Make sure that you added the [Coq repository](http://coq.io/opam/): + + opam repo add coq-released https://coq.inria.fr/opam/released + +and run: + + opam install coq-corn + +## Install from source +### Prerequisites +This version of C-CoRN is known to compile with: + +* Coq 8.4pl4 +* SCons 1.2 or make + +### Git checkout and submodules +C-CoRN depends on [Math Classes](https://github.com/math-classes/math-classes), which is a library of abstract interfaces for +mathematical structures that is heavily based on Coq's new type classes. + +### Building C-CoRN +C-CoRN uses [SCons](http://www.scons.org/) for its build infrastructure. SCons is a modern +Python-based Make-replacement. + +To build C-CoRN with SCons say `scons` to build the whole library, or +`scons some/module.vo` to just build `some/module.vo` (and its dependencies). + +In addition to common Make options like `-j N` and `-k`, SCons +supports some useful options of its own, such as `--debug=time`, which +displays the time spent executing individual build commands. + + scons -c replaces Make clean + +For more information, see the [SCons documentation](http://www.scons.org/). Make is still supported. + +### Building documentation +To build CoqDoc documentation, say `scons coqdoc`. From 6411967b1598350beb85cb984abb8b46b9beb3df Mon Sep 17 00:00:00 2001 From: Ben Sherman Date: Tue, 1 Mar 2016 15:23:18 -0500 Subject: [PATCH 18/20] Absolutize all [Import]s Use Jason Gross's `absolutize-imports.py` script to make all [Import] statements use absolute paths rather than just relative paths, which fixes errors for case-insensitive filesystems. See: https://gist.github.com/JasonGross/14decf638535a2447286 https://github.com/JasonGross/coq-tools --- algebra/Bernstein.v | 14 ++++----- algebra/CAbGroups.v | 2 +- algebra/CAbMonoids.v | 4 +-- algebra/CFields.v | 2 +- algebra/CGroups.v | 4 +-- algebra/CMonoids.v | 12 ++++---- algebra/COrdAbs.v | 2 +- algebra/COrdCauchy.v | 2 +- algebra/COrdFields.v | 6 ++-- algebra/COrdFields2.v | 2 +- algebra/CPoly_ApZero.v | 8 ++--- algebra/CPoly_Degree.v | 6 ++-- algebra/CPoly_NthCoeff.v | 6 ++-- algebra/CPolynomials.v | 4 +-- algebra/CRing_Homomorphisms.v | 2 +- algebra/CRing_as_Ring.v | 2 +- algebra/CRings.v | 6 ++-- algebra/CSemiGroups.v | 2 +- algebra/CSetoidFun.v | 2 +- algebra/CSetoidInc.v | 2 +- algebra/CSetoids.v | 8 ++--- algebra/CSums.v | 4 +-- algebra/Cauchy_COF.v | 4 +-- algebra/CornScope.v | 10 +++--- algebra/Expon.v | 4 +-- algebra/OperationClasses.v | 2 +- algebra/RSetoid.v | 6 ++-- classes/Qclasses.v | 8 ++--- classes/Qposclasses.v | 4 +-- complex/AbsCC.v | 2 +- complex/CComplex.v | 2 +- complex/Complex_Exponential.v | 6 ++-- complex/NRootCC.v | 6 ++-- coq_reals/Rreals.v | 30 +++++++++--------- coq_reals/Rreals_iso.v | 42 ++++++++++++------------- coq_reals/Rsign.v | 4 +-- fta/CC_Props.v | 2 +- fta/CPoly_Contin1.v | 2 +- fta/CPoly_Rev.v | 2 +- fta/CPoly_Shift.v | 2 +- fta/FTA.v | 4 +-- fta/FTAreg.v | 6 ++-- fta/KeyLemma.v | 6 ++-- fta/KneserLemma.v | 6 ++-- fta/MainLemma.v | 6 ++-- ftc/COrdLemmas.v | 2 +- ftc/CalculusTheorems.v | 4 +-- ftc/Composition.v | 4 +-- ftc/Continuity.v | 6 ++-- ftc/Derivative.v | 2 +- ftc/DerivativeOps.v | 2 +- ftc/Differentiability.v | 4 +-- ftc/FTC.v | 4 +-- ftc/FunctSequence.v | 4 +-- ftc/FunctSeries.v | 4 +-- ftc/FunctSums.v | 4 +-- ftc/Integral.v | 2 +- ftc/IntegrationRules.v | 4 +-- ftc/IntervalFunct.v | 2 +- ftc/MoreFunSeries.v | 4 +-- ftc/MoreFunctions.v | 2 +- ftc/MoreIntegrals.v | 4 +-- ftc/MoreIntervals.v | 2 +- ftc/NthDerivative.v | 2 +- ftc/PartFunEquality.v | 4 +-- ftc/PartInterval.v | 2 +- ftc/Partitions.v | 2 +- ftc/RefLemma.v | 6 ++-- ftc/RefSepRef.v | 4 +-- ftc/RefSeparated.v | 4 +-- ftc/RefSeparating.v | 4 +-- ftc/Rolle.v | 4 +-- ftc/StrongIVT.v | 4 +-- ftc/Taylor.v | 2 +- ftc/TaylorLemma.v | 2 +- ftc/WeakIVT.v | 2 +- ftc/WeakIVTQ.v | 2 +- logic/CLogic.v | 12 ++++---- logic/Classic.v | 2 +- logic/CornBasics.v | 14 ++++----- logic/Stability.v | 4 +-- metric2/Classification.v | 4 +-- metric2/Compact.v | 22 ++++++------- metric2/Complete.v | 18 +++++------ metric2/CompleteProduct.v | 6 ++-- metric2/DistanceMetricSpace.v | 2 +- metric2/FinEnum.v | 18 +++++------ metric2/Graph.v | 20 ++++++------ metric2/Hausdorff.v | 16 +++++----- metric2/Limit.v | 6 ++-- metric2/Metric.v | 22 ++++++------- metric2/MetricMorphisms.v | 12 ++++---- metric2/Prelength.v | 20 ++++++------ metric2/ProductMetric.v | 14 ++++----- metric2/StepFunction.v | 10 +++--- metric2/StepFunctionMonad.v | 8 ++--- metric2/StepFunctionSetoid.v | 14 ++++----- metric2/UCFnMonoid.v | 2 +- metric2/UniformContinuity.v | 8 ++--- metrics/CMetricSpaces.v | 4 +-- metrics/CPMSTheory.v | 2 +- metrics/CPseudoMSpaces.v | 2 +- metrics/ContFunctions.v | 2 +- metrics/Equiv.v | 2 +- metrics/IR_CPMSpace.v | 2 +- metrics/LipExt.v | 6 ++-- metrics/Prod_Sub.v | 2 +- model/Zmod/Cmod.v | 4 +-- model/Zmod/IrrCrit.v | 6 ++-- model/Zmod/ZBasics.v | 4 +-- model/Zmod/ZDivides.v | 2 +- model/Zmod/ZGcd.v | 2 +- model/Zmod/ZMod.v | 2 +- model/Zmod/Zm.v | 4 +-- model/abgroups/CRabgroup.v | 8 ++--- model/abgroups/QSposabgroup.v | 4 +-- model/abgroups/Qabgroup.v | 4 +-- model/abgroups/Qposabgroup.v | 4 +-- model/abgroups/Zabgroup.v | 4 +-- model/fields/CRfield.v | 10 +++--- model/fields/Qfield.v | 4 +-- model/groups/CRgroup.v | 8 ++--- model/groups/QSposgroup.v | 4 +-- model/groups/Qgroup.v | 4 +-- model/groups/Qposgroup.v | 4 +-- model/groups/Zgroup.v | 4 +-- model/lattice/CRlattice.v | 4 +-- model/metric2/BoundedFunction.v | 10 +++--- model/metric2/CRmetric.v | 12 ++++---- model/metric2/IntegrableFunction.v | 14 ++++----- model/metric2/L1metric.v | 22 ++++++------- model/metric2/LinfDistMonad.v | 14 ++++----- model/metric2/LinfMetric.v | 24 +++++++-------- model/metric2/LinfMetricMonad.v | 24 +++++++-------- model/metric2/Qmetric.v | 20 ++++++------ model/monoids/CRmonoid.v | 8 ++--- model/monoids/Nm_to_cycm.v | 4 +-- model/monoids/Nm_to_freem.v | 6 ++-- model/monoids/Nmonoid.v | 4 +-- model/monoids/Nposmonoid.v | 4 +-- model/monoids/QSposmonoid.v | 4 +-- model/monoids/Qmonoid.v | 4 +-- model/monoids/Qposmonoid.v | 4 +-- model/monoids/Zmonoid.v | 4 +-- model/monoids/freem_to_Nm.v | 4 +-- model/ordfields/CRordfield.v | 10 +++--- model/ordfields/Qordfield.v | 6 ++-- model/partialorder/CRpartialorder.v | 4 +-- model/reals/CRreal.v | 12 ++++---- model/reals/Cauchy_IR.v | 4 +-- model/rings/CRring.v | 12 ++++---- model/rings/Qring.v | 6 ++-- model/rings/Zring.v | 4 +-- model/semigroups/CRsemigroup.v | 10 +++--- model/semigroups/Npossemigroup.v | 6 ++-- model/semigroups/Nsemigroup.v | 4 +-- model/semigroups/QSpossemigroup.v | 4 +-- model/semigroups/Qpossemigroup.v | 4 +-- model/semigroups/Qsemigroup.v | 4 +-- model/semigroups/Zsemigroup.v | 4 +-- model/setoids/CRsetoid.v | 8 ++--- model/setoids/Nfinsetoid.v | 2 +- model/setoids/Npossetoid.v | 6 ++-- model/setoids/Nsetoid.v | 4 +-- model/setoids/Qpossetoid.v | 6 ++-- model/setoids/Qsetoid.v | 4 +-- model/setoids/Zfinsetoid.v | 4 +-- model/setoids/Zsetoid.v | 4 +-- model/setoids/decsetoid.v | 8 ++--- model/structures/NNUpperR.v | 4 +-- model/structures/Npossec.v | 4 +-- model/structures/Nsec.v | 6 ++-- model/structures/OpenUnit.v | 10 +++--- model/structures/Qinf.v | 10 +++--- model/structures/QnnInf.v | 4 +-- model/structures/QnonNeg.v | 2 +- model/structures/QposInf.v | 6 ++-- model/structures/Qpossec.v | 20 ++++++------ model/structures/Qsec.v | 12 ++++---- model/structures/StepQsec.v | 14 ++++----- model/structures/Zsec.v | 6 ++-- model/totalorder/QMinMax.v | 4 +-- model/totalorder/QposMinMax.v | 8 ++--- model/totalorder/ZMinMax.v | 8 ++--- ode/AbstractIntegration.v | 24 +++++++-------- ode/BanachFixpoint.v | 14 ++++----- ode/FromMetric2.v | 10 +++--- ode/Picard.v | 12 ++++---- ode/SimpleIntegration.v | 26 ++++++++-------- ode/metric.v | 16 +++++----- order/Lattice.v | 4 +-- order/PartialOrder.v | 2 +- order/SemiLattice.v | 2 +- order/TotalOrder.v | 4 +-- raster/Raster.v | 6 ++-- reals/Bridges_LUB.v | 4 +-- reals/Bridges_iso.v | 2 +- reals/CMetricFields.v | 2 +- reals/CPoly_Contin.v | 2 +- reals/CReals.v | 2 +- reals/CReals1.v | 6 ++-- reals/CSumsReals.v | 2 +- reals/CauchySeq.v | 4 +-- reals/Cauchy_CReals.v | 4 +-- reals/Cesaro.v | 4 +-- reals/IVT.v | 2 +- reals/Intervals.v | 4 +-- reals/Max_AbsIR.v | 6 ++-- reals/NRootIR.v | 2 +- reals/OddPolyRootIR.v | 2 +- reals/PosSeq.v | 2 +- reals/Q_dense.v | 2 +- reals/Q_in_CReals.v | 14 ++++----- reals/R_morphism.v | 2 +- reals/RealCount.v | 2 +- reals/RealFuncts.v | 2 +- reals/RealLists.v | 2 +- reals/Series.v | 4 +-- reals/fast/CRAlternatingSum.v | 32 +++++++++---------- reals/fast/CRArith.v | 34 ++++++++++---------- reals/fast/CRFieldOps.v | 18 +++++------ reals/fast/CRGeometricSum.v | 28 ++++++++--------- reals/fast/CRGroupOps.v | 18 +++++------ reals/fast/CRIR.v | 12 ++++---- reals/fast/CRabs.v | 18 +++++------ reals/fast/CRarctan.v | 26 ++++++++-------- reals/fast/CRarctan_small.v | 26 ++++++++-------- reals/fast/CRartanh_slow.v | 28 ++++++++--------- reals/fast/CRball.v | 2 +- reals/fast/CRconst.v | 2 +- reals/fast/CRcorrect.v | 14 ++++----- reals/fast/CRcos.v | 30 +++++++++--------- reals/fast/CRexp.v | 46 ++++++++++++++-------------- reals/fast/CRln.v | 24 +++++++-------- reals/fast/CRpi.v | 4 +-- reals/fast/CRpi_fast.v | 18 +++++------ reals/fast/CRpi_slow.v | 16 +++++----- reals/fast/CRpower.v | 18 +++++------ reals/fast/CRroot.v | 36 +++++++++++----------- reals/fast/CRseries.v | 24 +++++++-------- reals/fast/CRsign.v | 6 ++-- reals/fast/CRsin.v | 40 ++++++++++++------------ reals/fast/CRsum.v | 12 ++++---- reals/fast/CRtrans.v | 22 ++++++------- reals/fast/Compress.v | 10 +++--- reals/fast/ContinuousCorrect.v | 12 ++++---- reals/fast/Integration.v | 46 ++++++++++++++-------------- reals/fast/Interval.v | 22 ++++++------- reals/fast/LazyNat.v | 2 +- reals/fast/ModulusDerivative.v | 12 ++++---- reals/fast/MultivariatePolynomials.v | 26 ++++++++-------- reals/fast/Plot.v | 12 ++++---- reals/fast/PowerBound.v | 14 ++++----- reals/fast/RasterQ.v | 12 ++++---- reals/fast/RasterizeQ.v | 16 +++++----- reals/fast/uneven_CRplus.v | 2 +- reals/faster/AQmetric.v | 6 ++-- reals/faster/ARAlternatingSum.v | 8 ++--- reals/faster/ARArith.v | 16 +++++----- reals/faster/ARQ.v | 8 ++--- reals/faster/ARarctan.v | 6 ++-- reals/faster/ARarctan_small.v | 10 +++--- reals/faster/ARbigD.v | 8 ++--- reals/faster/ARbigQ.v | 10 +++--- reals/faster/ARcos.v | 6 ++-- reals/faster/ARexp.v | 12 ++++---- reals/faster/ARpi.v | 6 ++-- reals/faster/ARroot.v | 12 ++++---- reals/faster/ARsign.v | 2 +- reals/faster/ARsin.v | 12 ++++---- reals/faster/ARtrans.v | 14 ++++----- reals/faster/ApproximateRationals.v | 14 ++++----- reals/iso_CReals.v | 4 +-- stdlib_omissions/List.v | 4 +-- stdlib_omissions/N.v | 2 +- stdlib_omissions/P.v | 2 +- stdlib_omissions/Pair.v | 2 +- stdlib_omissions/Q.v | 6 ++-- stdlib_omissions/Z.v | 2 +- tactics/AlgReflection.v | 2 +- tactics/CornTac.v | 2 +- tactics/DiffTactics2.v | 2 +- tactics/DiffTactics3.v | 6 ++-- tactics/FieldReflection.v | 4 +-- tactics/Qauto.v | 10 +++--- tactics/Rational.v | 6 ++-- tactics/RingReflection.v | 4 +-- tactics/csetoid_rewrite.v | 2 +- transc/ArTanH.v | 4 +-- transc/Exponential.v | 2 +- transc/InvTrigonom.v | 6 ++-- transc/MoreArcTan.v | 4 +-- transc/Pi.v | 4 +-- transc/PowerSeries.v | 2 +- transc/RealPowers.v | 2 +- transc/SinCos.v | 2 +- transc/TaylorSeries.v | 4 +-- transc/TrigMon.v | 4 +-- transc/Trigonometric.v | 2 +- util/Container.v | 2 +- util/Extract.v | 2 +- util/PointFree.v | 2 +- util/Qdlog.v | 6 ++-- util/Qgcd.v | 2 +- util/Qsums.v | 12 ++++---- util/SetoidPermutation.v | 2 +- 306 files changed, 1197 insertions(+), 1197 deletions(-) diff --git a/algebra/Bernstein.v b/algebra/Bernstein.v index 12d4b1f2..bf481027 100644 --- a/algebra/Bernstein.v +++ b/algebra/Bernstein.v @@ -19,13 +19,13 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Export CPolynomials. -Require Import CSums. -Require Import Rational. -Require Import Qordfield. -Require Import COrdFields2. -Require Import CRing_Homomorphisms. -Require Vector. +Require Export CoRN.algebra.CPolynomials. +Require Import CoRN.algebra.CSums. +Require Import CoRN.tactics.Rational. +Require Import CoRN.model.ordfields.Qordfield. +Require Import CoRN.algebra.COrdFields2. +Require Import CoRN.algebra.CRing_Homomorphisms. +Require Coq.Vectors.Vector. Export Vector.VectorNotations. Set Implicit Arguments. diff --git a/algebra/CAbGroups.v b/algebra/CAbGroups.v index c21d00f1..c5844df1 100644 --- a/algebra/CAbGroups.v +++ b/algebra/CAbGroups.v @@ -33,7 +33,7 @@ * with this work; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export CGroups. +Require Export CoRN.algebra.CGroups. Section Abelian_Groups. diff --git a/algebra/CAbMonoids.v b/algebra/CAbMonoids.v index 8650548c..62a94153 100644 --- a/algebra/CAbMonoids.v +++ b/algebra/CAbMonoids.v @@ -33,9 +33,9 @@ * with this work; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export CMonoids. +Require Export CoRN.algebra.CMonoids. -Require Import SetoidPermutation Setoid Morphisms. +Require Import CoRN.util.SetoidPermutation Coq.Setoids.Setoid Coq.Classes.Morphisms. Section Abelian_Monoids. diff --git a/algebra/CFields.v b/algebra/CFields.v index 478c5983..e00c1461 100644 --- a/algebra/CFields.v +++ b/algebra/CFields.v @@ -40,7 +40,7 @@ (** printing {1/} %\ensuremath{\frac1\cdot}% #1/# *) (** printing [/]?[//] %\ensuremath{/?\ddagger}% #/?‡# *) -Require Export CRings. +Require Export CoRN.algebra.CRings. Set Automatic Introduction. Transparent sym_eq. diff --git a/algebra/CGroups.v b/algebra/CGroups.v index 1a7b7390..8f70619d 100644 --- a/algebra/CGroups.v +++ b/algebra/CGroups.v @@ -40,8 +40,8 @@ (** printing {-} %\ensuremath-% #−# *) (** printing {--} %\ensuremath-% #−# *) -Require Import CornTac. -Require Export CMonoids. +Require Import CoRN.tactics.CornTac. +Require Export CoRN.algebra.CMonoids. Set Automatic Introduction. (* Begin_SpecReals *) diff --git a/algebra/CMonoids.v b/algebra/CMonoids.v index 5ea97eb0..cf62255d 100644 --- a/algebra/CMonoids.v +++ b/algebra/CMonoids.v @@ -36,12 +36,12 @@ (** printing [0] %\ensuremath{\mathbf0}% #0# *) -Require Export Euclid. -Require Export Cmod. -Require Export CSemiGroups. -Require Export csetoid_rewrite. -Require Export Nsec. -Require Import SetoidPermutation Setoid Morphisms. +Require Export Coq.Arith.Euclid. +Require Export CoRN.model.Zmod.Cmod. +Require Export CoRN.algebra.CSemiGroups. +Require Export CoRN.tactics.csetoid_rewrite. +Require Export CoRN.model.structures.Nsec. +Require Import CoRN.util.SetoidPermutation Coq.Setoids.Setoid Coq.Classes.Morphisms. (* Begin_SpecReals *) diff --git a/algebra/COrdAbs.v b/algebra/COrdAbs.v index 3fcac3b5..c6159fda 100644 --- a/algebra/COrdAbs.v +++ b/algebra/COrdAbs.v @@ -34,7 +34,7 @@ * with this work; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export COrdFields2. +Require Export CoRN.algebra.COrdFields2. (** ** Properties of [AbsSmall] diff --git a/algebra/COrdCauchy.v b/algebra/COrdCauchy.v index e877ba13..c6992d65 100644 --- a/algebra/COrdCauchy.v +++ b/algebra/COrdCauchy.v @@ -33,7 +33,7 @@ * with this work; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export COrdAbs. +Require Export CoRN.algebra.COrdAbs. Set Automatic Introduction. (* Begin_SpecReals *) diff --git a/algebra/COrdFields.v b/algebra/COrdFields.v index 0bf1ad28..e3359735 100644 --- a/algebra/COrdFields.v +++ b/algebra/COrdFields.v @@ -51,9 +51,9 @@ (** printing TwentyFourNZ %\ensuremath{\mathbf{24}}% #24# *) (** printing FortyEightNZ %\ensuremath{\mathbf{48}}% #48# *) -Require Export FieldReflection. -Require Export CSetoids. -Require Export Rational. +Require Export CoRN.tactics.FieldReflection. +Require Export CoRN.algebra.CSetoids. +Require Export CoRN.tactics.Rational. (* ORDERED FIELDS *) diff --git a/algebra/COrdFields2.v b/algebra/COrdFields2.v index fe40e264..c152c377 100644 --- a/algebra/COrdFields2.v +++ b/algebra/COrdFields2.v @@ -33,7 +33,7 @@ * with this work; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export COrdFields. +Require Export CoRN.algebra.COrdFields. (** printing one_div_succ %\ensuremath{\frac1{\cdot+1}}% *) (** printing Half %\ensuremath{\frac12}% #½# *) diff --git a/algebra/CPoly_ApZero.v b/algebra/CPoly_ApZero.v index 840dff0b..f4e4979f 100644 --- a/algebra/CPoly_ApZero.v +++ b/algebra/CPoly_ApZero.v @@ -34,10 +34,10 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export CPoly_Degree. -Require Export COrdFields2. -Require Import Morphisms Permutation. -Require ne_list. +Require Export CoRN.algebra.CPoly_Degree. +Require Export CoRN.algebra.COrdFields2. +Require Import Coq.Classes.Morphisms Coq.Sorting.Permutation. +Require MathClasses.implementations.ne_list. Import ne_list.notations. Set Automatic Introduction. diff --git a/algebra/CPoly_Degree.v b/algebra/CPoly_Degree.v index 2f5b332d..e576ec58 100644 --- a/algebra/CPoly_Degree.v +++ b/algebra/CPoly_Degree.v @@ -34,9 +34,9 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export CPoly_NthCoeff. -Require Export CFields. -Require Export Rational. +Require Export CoRN.algebra.CPoly_NthCoeff. +Require Export CoRN.algebra.CFields. +Require Export CoRN.tactics.Rational. Set Automatic Introduction. (** diff --git a/algebra/CPoly_NthCoeff.v b/algebra/CPoly_NthCoeff.v index 8bde79c8..6f3377b6 100644 --- a/algebra/CPoly_NthCoeff.v +++ b/algebra/CPoly_NthCoeff.v @@ -34,9 +34,9 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export CPolynomials. -Require Import Morphisms. -Require Import CRings. +Require Export CoRN.algebra.CPolynomials. +Require Import Coq.Classes.Morphisms. +Require Import CoRN.algebra.CRings. (** * Polynomials: Nth Coefficient diff --git a/algebra/CPolynomials.v b/algebra/CPolynomials.v index ac837e2d..49ba3fc3 100644 --- a/algebra/CPolynomials.v +++ b/algebra/CPolynomials.v @@ -40,8 +40,8 @@ (** printing RX %\ensuremath{R[x]}% #R[x]# *) (** printing FX %\ensuremath{F[x]}% #F[x]# *) -Require Import CRing_Homomorphisms. -Require Import Rational. +Require Import CoRN.algebra.CRing_Homomorphisms. +Require Import CoRN.tactics.Rational. (** * Polynomials diff --git a/algebra/CRing_Homomorphisms.v b/algebra/CRing_Homomorphisms.v index c8cd6dc4..b61dfffe 100644 --- a/algebra/CRing_Homomorphisms.v +++ b/algebra/CRing_Homomorphisms.v @@ -46,7 +46,7 @@ (** printing [1] %\ensuremath{\mathbf1}% #1# *) (** printing phi %\ensuremath{\phi}% *) -Require Export CRings. +Require Export CoRN.algebra.CRings. Set Automatic Introduction. (** diff --git a/algebra/CRing_as_Ring.v b/algebra/CRing_as_Ring.v index ff870153..b612cd41 100644 --- a/algebra/CRing_as_Ring.v +++ b/algebra/CRing_as_Ring.v @@ -1,5 +1,5 @@ -Require Export CRings Ring. +Require Export CoRN.algebra.CRings Coq.setoid_ring.Ring. Definition CRing_Ring(R:CRing):(ring_theory (@cm_unit R) (@cr_one R) (@csg_op R) (@cr_mult R) (fun x y => x [-] y) (@cg_inv R) (@cs_eq R)). Proof. split;algebra. diff --git a/algebra/CRings.v b/algebra/CRings.v index 65e2398d..5b2eb571 100644 --- a/algebra/CRings.v +++ b/algebra/CRings.v @@ -53,9 +53,9 @@ (** printing TwentyFour %\ensuremath{\mathbf{24}}% #24# *) (** printing FortyEight %\ensuremath{\mathbf{48}}% #48# *) -Require Import CornTac. -Require Export CSums. -Require Import CAbMonoids Permutation SetoidPermutation Setoid Morphisms. +Require Import CoRN.tactics.CornTac. +Require Export CoRN.algebra.CSums. +Require Import CoRN.algebra.CAbMonoids Coq.Sorting.Permutation CoRN.util.SetoidPermutation Coq.Setoids.Setoid Coq.Classes.Morphisms. Transparent sym_eq. Transparent f_equal. diff --git a/algebra/CSemiGroups.v b/algebra/CSemiGroups.v index 44cc1ac6..98f30975 100644 --- a/algebra/CSemiGroups.v +++ b/algebra/CSemiGroups.v @@ -37,7 +37,7 @@ (** printing [+] %\ensuremath+% #+# *) (** printing {+} %\ensuremath+% #+# *) -Require Export CSetoidInc. +Require Export CoRN.algebra.CSetoidInc. (* Begin_SpecReals *) diff --git a/algebra/CSetoidFun.v b/algebra/CSetoidFun.v index 456699b4..d43ee019 100644 --- a/algebra/CSetoidFun.v +++ b/algebra/CSetoidFun.v @@ -34,7 +34,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export CSetoids. +Require Export CoRN.algebra.CSetoids. (** ** The Setoid of Setoid functions diff --git a/algebra/CSetoidInc.v b/algebra/CSetoidInc.v index d6bb0f8c..42b3bf59 100644 --- a/algebra/CSetoidInc.v +++ b/algebra/CSetoidInc.v @@ -36,7 +36,7 @@ (** printing included %\ensuremath{\subseteq}% #⊆# *) -Require Export CSetoidFun. +Require Export CoRN.algebra.CSetoidFun. Section inclusion. diff --git a/algebra/CSetoids.v b/algebra/CSetoids.v index 9d5cbb6b..42c986f4 100644 --- a/algebra/CSetoids.v +++ b/algebra/CSetoids.v @@ -50,10 +50,10 @@ Definition of a constructive setoid with apartness, i.e.%\% a set with an equivalence relation and an apartness relation compatible with it. *) -Require Import CornTac. -Require Export CLogic. -Require Export Step. -Require Export RSetoid. +Require Import CoRN.tactics.CornTac. +Require Export CoRN.logic.CLogic. +Require Export CoRN.tactics.Step. +Require Export CoRN.algebra.RSetoid. Delimit Scope corn_scope with corn. Open Scope corn_scope. diff --git a/algebra/CSums.v b/algebra/CSums.v index a1af6c3c..93458eaf 100644 --- a/algebra/CSums.v +++ b/algebra/CSums.v @@ -40,8 +40,8 @@ (** printing Sum %\ensuremath{\sum}% #∑# *) (** printing Sumx %\ensuremath{\sum'}% #∑'&*) -Require Export CAbGroups. -Require Export Peano_dec. +Require Export CoRN.algebra.CAbGroups. +Require Export Coq.Arith.Peano_dec. (** * Sums diff --git a/algebra/Cauchy_COF.v b/algebra/Cauchy_COF.v index dcd2b631..7c16a15f 100644 --- a/algebra/Cauchy_COF.v +++ b/algebra/Cauchy_COF.v @@ -34,8 +34,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export COrdCauchy. -Require Export RingReflection. +Require Export CoRN.algebra.COrdCauchy. +Require Export CoRN.tactics.RingReflection. (** * The Field of Cauchy Sequences diff --git a/algebra/CornScope.v b/algebra/CornScope.v index 02de8c8b..d4631ff8 100644 --- a/algebra/CornScope.v +++ b/algebra/CornScope.v @@ -1,4 +1,4 @@ -Require Export CSetoids. +Require Export CoRN.algebra.CSetoids. Delimit Scope corn_scope with corn. (* Open Scope corn_scope.*) @@ -8,20 +8,20 @@ Arguments Scope cs_eq [ _ corn_scope corn_scope]. (* Infix "#" := cs_ap (at level 70, no associativity) : corn_scope. *) Infix "==" := cs_eq (at level 70, no associativity) : corn_scope. -Require Import CSemiGroups. +Require Import CoRN.algebra.CSemiGroups. Arguments Scope csg_op [ _ corn_scope corn_scope ]. Infix "+" := csg_op (at level 50, left associativity) : corn_scope. -Require Import CMonoids. +Require Import CoRN.algebra.CMonoids. Notation "0" := (cm_unit _) : corn_scope. Notation "(+)" := csg_op (only parsing) : corn_scope. -Require Import CGroups. +Require Import CoRN.algebra.CGroups. Notation "- x" := (cg_inv x) (at level 35, right associativity) : corn_scope. Infix "-" := cg_minus (at level 50, left associativity) : corn_scope. -Require Import CRings. +Require Import CoRN.algebra.CRings. Arguments Scope cr_mult [ _ corn_scope corn_scope ]. Infix "*" := cr_mult (at level 40, left associativity) : corn_scope. Notation "x ^ n" := (nexp_op _ n x) : corn_scope. diff --git a/algebra/Expon.v b/algebra/Expon.v index 9243d6d3..0814b39c 100644 --- a/algebra/Expon.v +++ b/algebra/Expon.v @@ -36,8 +36,8 @@ (** printing [^^] %\ensuremath{\hat{\ }}% #^# *) -Require Export Arith. -Require Export COrdCauchy. +Require Export Coq.Arith.Arith. +Require Export CoRN.algebra.COrdCauchy. Load "Transparent_algebra". diff --git a/algebra/OperationClasses.v b/algebra/OperationClasses.v index 478b68ab..7adcaea0 100644 --- a/algebra/OperationClasses.v +++ b/algebra/OperationClasses.v @@ -19,7 +19,7 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Import Setoid Morphisms. +Require Import Coq.Setoids.Setoid Coq.Classes.Morphisms. Notation " x === y " := (Equivalence.equiv x y) (at level 70, no associativity). Set Implicit Arguments. diff --git a/algebra/RSetoid.v b/algebra/RSetoid.v index fcc70f54..08abdb39 100644 --- a/algebra/RSetoid.v +++ b/algebra/RSetoid.v @@ -21,9 +21,9 @@ CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. Set Implicit Arguments. -Require Export Setoid. -Require Import CornBasics. -Require Import abstract_algebra. +Require Export Coq.Setoids.Setoid. +Require Import CoRN.logic.CornBasics. +Require Import MathClasses.interfaces.abstract_algebra. (* Require Import CornTac.*) diff --git a/classes/Qclasses.v b/classes/Qclasses.v index 7a94db5c..0a6b2216 100644 --- a/classes/Qclasses.v +++ b/classes/Qclasses.v @@ -1,9 +1,9 @@ Require Import - QMinMax - abstract_algebra - minmax. + CoRN.model.totalorder.QMinMax + MathClasses.interfaces.abstract_algebra + MathClasses.orders.minmax. Require Export - stdlib_rationals. + MathClasses.implementations.stdlib_rationals. Lemma Qmin_coincides x y : Qmin x y = x ⊓ y. Proof. diff --git a/classes/Qposclasses.v b/classes/Qposclasses.v index cc1353db..a4175d50 100644 --- a/classes/Qposclasses.v +++ b/classes/Qposclasses.v @@ -1,7 +1,7 @@ (* todo: remove *) -Require Export Qpossec. -Require Import abstract_algebra additional_operations stdlib_rationals. +Require Export CoRN.model.structures.Qpossec. +Require Import MathClasses.interfaces.abstract_algebra MathClasses.interfaces.additional_operations MathClasses.implementations.stdlib_rationals. Instance: Equiv Qpos := QposEq. Instance: One Qpos := Qpos_one. diff --git a/complex/AbsCC.v b/complex/AbsCC.v index 85626321..0bfeb5fe 100644 --- a/complex/AbsCC.v +++ b/complex/AbsCC.v @@ -34,7 +34,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export CComplex. +Require Export CoRN.complex.CComplex. (** * Absolute value on [CC] diff --git a/complex/CComplex.v b/complex/CComplex.v index 65918980..18ecfc23 100644 --- a/complex/CComplex.v +++ b/complex/CComplex.v @@ -42,7 +42,7 @@ (** printing AbsCC %\ensuremath{|\cdot|_{\mathbb C}}% *) (** printing CCX %\ensuremath{\mathbb C[X]}% #C[X]# *) -Require Export NRootIR. +Require Export CoRN.reals.NRootIR. (** * Complex Numbers diff --git a/complex/Complex_Exponential.v b/complex/Complex_Exponential.v index 203ada86..8fbb9081 100644 --- a/complex/Complex_Exponential.v +++ b/complex/Complex_Exponential.v @@ -36,9 +36,9 @@ (** printing ExpCC %\ensuremath{\exp_{\mathbb C}}% *) -Require Export AbsCC. -Require Export Exponential. -Require Export Pi. +Require Export CoRN.complex.AbsCC. +Require Export CoRN.transc.Exponential. +Require Export CoRN.transc.Pi. (** ** The Complex Exponential *) diff --git a/complex/NRootCC.v b/complex/NRootCC.v index 0813ca27..35f85f5d 100644 --- a/complex/NRootCC.v +++ b/complex/NRootCC.v @@ -39,9 +39,9 @@ (** printing nroot_I %\ensuremath{\sqrt[n]{\imath}}% *) (** printing nroot_minus_I %\ensuremath{\sqrt[n]{-\imath}}% *) -Require Export CComplex. -Require Export Wf_nat. -Require Export ArithRing. +Require Export CoRN.complex.CComplex. +Require Export Coq.Arith.Wf_nat. +Require Export Coq.setoid_ring.ArithRing. (** * Roots of Complex Numbers diff --git a/coq_reals/Rreals.v b/coq_reals/Rreals.v index b2304317..98f1da1a 100644 --- a/coq_reals/Rreals.v +++ b/coq_reals/Rreals.v @@ -17,21 +17,21 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Import CSetoids. -Require Import CSemiGroups. -Require Import CMonoids. -Require Import CGroups. -Require Import CornTac. -Require Import CAbGroups. -Require Import CRings. -Require Import CFields. -Require Import COrdFields. -Require Import CReals. -Require Import RIneq. -Require Import Rcomplete. -Require Import Rlimit. -Require Import Rbasic_fun. -Require Import Fourier. +Require Import CoRN.algebra.CSetoids. +Require Import CoRN.algebra.CSemiGroups. +Require Import CoRN.algebra.CMonoids. +Require Import CoRN.algebra.CGroups. +Require Import CoRN.tactics.CornTac. +Require Import CoRN.algebra.CAbGroups. +Require Import CoRN.algebra.CRings. +Require Import CoRN.algebra.CFields. +Require Import CoRN.algebra.COrdFields. +Require Import CoRN.reals.CReals. +Require Import Coq.Reals.RIneq. +Require Import Coq.Reals.Rcomplete. +Require Import Coq.Reals.Rlimit. +Require Import Coq.Reals.Rbasic_fun. +Require Import Coq.fourier.Fourier. (** * Coq Real Numbers diff --git a/coq_reals/Rreals_iso.v b/coq_reals/Rreals_iso.v index 195a78a5..ea42cc1b 100644 --- a/coq_reals/Rreals_iso.v +++ b/coq_reals/Rreals_iso.v @@ -17,27 +17,27 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Import QArith. -Require Import Qreals. -Require Import QArith_base. -Require Import CornTac. -Require Import RIneq. -Require Import Rcomplete. -Require Import Rlimit. -Require Import Rbasic_fun. -Require Import Fourier. -Require Import Rreals. -Require Import iso_CReals. -Require Import CauchySeq. -Require Import Rtrigo_def. -Require Import PowerSeries. -Require Import ConstructiveEpsilon. -Require Import Rlogic. -Require Export Reals. -Require Import Pi. -Require Import MoreArcTan. -Require Import PropDecid. -Require Import Exponential. +Require Import Coq.QArith.QArith. +Require Import Coq.QArith.Qreals. +Require Import Coq.QArith.QArith_base. +Require Import CoRN.tactics.CornTac. +Require Import Coq.Reals.RIneq. +Require Import Coq.Reals.Rcomplete. +Require Import Coq.Reals.Rlimit. +Require Import Coq.Reals.Rbasic_fun. +Require Import Coq.fourier.Fourier. +Require Import CoRN.coq_reals.Rreals. +Require Import CoRN.reals.iso_CReals. +Require Import CoRN.reals.CauchySeq. +Require Import Coq.Reals.Rtrigo_def. +Require Import CoRN.transc.PowerSeries. +Require Import Coq.Logic.ConstructiveEpsilon. +Require Import Coq.Reals.Rlogic. +Require Export Coq.Reals.Reals. +Require Import CoRN.transc.Pi. +Require Import CoRN.transc.MoreArcTan. +Require Import CoRN.logic.PropDecid. +Require Import CoRN.transc.Exponential. (** * Coq Real Numbers and IR isomorphisms diff --git a/coq_reals/Rsign.v b/coq_reals/Rsign.v index e4e41570..7120146d 100644 --- a/coq_reals/Rsign.v +++ b/coq_reals/Rsign.v @@ -1,5 +1,5 @@ -Require Import Rreals_iso. -Require Import CRsign. +Require Import CoRN.coq_reals.Rreals_iso. +Require Import CoRN.reals.fast.CRsign. Ltac R_dec_precompute := try apply Rlt_le; diff --git a/fta/CC_Props.v b/fta/CC_Props.v index ca3101e1..2ec3c706 100644 --- a/fta/CC_Props.v +++ b/fta/CC_Props.v @@ -34,7 +34,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export AbsCC. +Require Export CoRN.complex.AbsCC. (** * More properties of complex numbers diff --git a/fta/CPoly_Contin1.v b/fta/CPoly_Contin1.v index a62dbacc..afe4ad6b 100644 --- a/fta/CPoly_Contin1.v +++ b/fta/CPoly_Contin1.v @@ -34,7 +34,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export CC_Props. +Require Export CoRN.fta.CC_Props. (** * Continuity of complex polynomials diff --git a/fta/CPoly_Rev.v b/fta/CPoly_Rev.v index e3087316..0e5b5a06 100644 --- a/fta/CPoly_Rev.v +++ b/fta/CPoly_Rev.v @@ -34,7 +34,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export CPoly_Degree. +Require Export CoRN.algebra.CPoly_Degree. (** * Reverse of polynomials diff --git a/fta/CPoly_Shift.v b/fta/CPoly_Shift.v index 46daa6bb..6ffdcf72 100644 --- a/fta/CPoly_Shift.v +++ b/fta/CPoly_Shift.v @@ -34,7 +34,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export CComplex. +Require Export CoRN.complex.CComplex. (** * Shifting polynomials diff --git a/fta/FTA.v b/fta/FTA.v index c11f4d43..d31b9c5f 100644 --- a/fta/FTA.v +++ b/fta/FTA.v @@ -34,8 +34,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export CPoly_Rev. -Require Export FTAreg. +Require Export CoRN.fta.CPoly_Rev. +Require Export CoRN.fta.FTAreg. (** * Fundamental Theorem of Algebra diff --git a/fta/FTAreg.v b/fta/FTAreg.v index a19f45fd..e9abcfaf 100644 --- a/fta/FTAreg.v +++ b/fta/FTAreg.v @@ -34,9 +34,9 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export KneserLemma. -Require Export CPoly_Shift. -Require Export CPoly_Contin1. +Require Export CoRN.fta.KneserLemma. +Require Export CoRN.fta.CPoly_Shift. +Require Export CoRN.fta.CPoly_Contin1. (** * FTA for regular polynomials diff --git a/fta/KeyLemma.v b/fta/KeyLemma.v index 237736dd..af14a746 100644 --- a/fta/KeyLemma.v +++ b/fta/KeyLemma.v @@ -34,9 +34,9 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export ZArith. -Require Export Compare. -Require Export NRootIR. +Require Export Coq.ZArith.ZArith. +Require Export Coq.Arith.Compare. +Require Export CoRN.reals.NRootIR. (** printing p3m %\ensuremath{\frac13\hat{\ }}% *) (** printing Halfeps %\ensuremath{\frac\varepsilon2}% *) diff --git a/fta/KneserLemma.v b/fta/KneserLemma.v index d329a2ba..50d3e46d 100644 --- a/fta/KneserLemma.v +++ b/fta/KneserLemma.v @@ -37,9 +37,9 @@ (** printing Smallest %\ensuremath{\frac13^{2n^2+n}}% *) (** printing eta_0 %\ensuremath{\eta_0}% #η0# *) -Require Export NRootCC. -Require Export AbsCC. -Require Export MainLemma. +Require Export CoRN.complex.NRootCC. +Require Export CoRN.complex.AbsCC. +Require Export CoRN.fta.MainLemma. (** ** Kneser Lemma *) diff --git a/fta/MainLemma.v b/fta/MainLemma.v index 4adacf1c..5c9f26aa 100644 --- a/fta/MainLemma.v +++ b/fta/MainLemma.v @@ -38,9 +38,9 @@ (** printing Small %\ensuremath{\frac13^n}% *) (** printing Smaller %\ensuremath{\frac13^{2n^2}}% *) -Require Export CSumsReals. -Require Export KeyLemma. -Require Import CRing_as_Ring. +Require Export CoRN.reals.CSumsReals. +Require Export CoRN.fta.KeyLemma. +Require Import CoRN.algebra.CRing_as_Ring. (** ** Main Lemma diff --git a/ftc/COrdLemmas.v b/ftc/COrdLemmas.v index f3475675..d0186a3d 100644 --- a/ftc/COrdLemmas.v +++ b/ftc/COrdLemmas.v @@ -34,7 +34,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export COrdCauchy. +Require Export CoRN.algebra.COrdCauchy. Section Lemmas. diff --git a/ftc/CalculusTheorems.v b/ftc/CalculusTheorems.v index eedf05ad..0ca533f7 100644 --- a/ftc/CalculusTheorems.v +++ b/ftc/CalculusTheorems.v @@ -34,8 +34,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export Rolle. -Require Export DiffTactics3. +Require Export CoRN.ftc.Rolle. +Require Export CoRN.tactics.DiffTactics3. Opaque Min Max. diff --git a/ftc/Composition.v b/ftc/Composition.v index a57e2cd9..4ec43f00 100644 --- a/ftc/Composition.v +++ b/ftc/Composition.v @@ -34,8 +34,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export MoreFunctions. -Require Export MoreFunSeries. +Require Export CoRN.ftc.MoreFunctions. +Require Export CoRN.ftc.MoreFunSeries. Section Maps_into_Compacts. diff --git a/ftc/Continuity.v b/ftc/Continuity.v index 10243088..8bf56acc 100644 --- a/ftc/Continuity.v +++ b/ftc/Continuity.v @@ -36,9 +36,9 @@ (** printing Norm_Funct %\ensuremath{\|\cdot\|}% *) -Require Export NRootIR. -Require Export FunctSums. -Require Import CornTac. +Require Export CoRN.reals.NRootIR. +Require Export CoRN.ftc.FunctSums. +Require Import CoRN.tactics.CornTac. Section Definitions_and_Basic_Results. diff --git a/ftc/Derivative.v b/ftc/Derivative.v index f1a7540c..b92aec0b 100644 --- a/ftc/Derivative.v +++ b/ftc/Derivative.v @@ -34,7 +34,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export Continuity. +Require Export CoRN.ftc.Continuity. Section Definitions. diff --git a/ftc/DerivativeOps.v b/ftc/DerivativeOps.v index dd58a472..9034d72f 100644 --- a/ftc/DerivativeOps.v +++ b/ftc/DerivativeOps.v @@ -34,7 +34,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export Derivative. +Require Export CoRN.ftc.Derivative. Section Lemmas. diff --git a/ftc/Differentiability.v b/ftc/Differentiability.v index 9fd4400f..4c8ff348 100644 --- a/ftc/Differentiability.v +++ b/ftc/Differentiability.v @@ -34,8 +34,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export PartInterval. -Require Export DerivativeOps. +Require Export CoRN.ftc.PartInterval. +Require Export CoRN.ftc.DerivativeOps. Section Definitions. diff --git a/ftc/FTC.v b/ftc/FTC.v index 24e3d982..333a2188 100644 --- a/ftc/FTC.v +++ b/ftc/FTC.v @@ -36,8 +36,8 @@ (** printing [-S-] %\ensuremath{\int}% #∫# *) -Require Export MoreIntegrals. -Require Export CalculusTheorems. +Require Export CoRN.ftc.MoreIntegrals. +Require Export CoRN.ftc.CalculusTheorems. Opaque Min. diff --git a/ftc/FunctSequence.v b/ftc/FunctSequence.v index 7f02a0fd..31aef529 100644 --- a/ftc/FunctSequence.v +++ b/ftc/FunctSequence.v @@ -34,8 +34,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export Continuity. -Require Export PartInterval. +Require Export CoRN.ftc.Continuity. +Require Export CoRN.ftc.PartInterval. Section Definitions. diff --git a/ftc/FunctSeries.v b/ftc/FunctSeries.v index 33fbbfbd..5b15537a 100644 --- a/ftc/FunctSeries.v +++ b/ftc/FunctSeries.v @@ -34,8 +34,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export FunctSequence. -Require Export Series. +Require Export CoRN.ftc.FunctSequence. +Require Export CoRN.reals.Series. (** printing fun_seq_part_sum %\ensuremath{\sum^n}% #∑n# *) (** printing Fun_Series_Sum %\ensuremath{\sum_0^{\infty}}% #∑0# *) diff --git a/ftc/FunctSums.v b/ftc/FunctSums.v index 1414e649..567e0410 100644 --- a/ftc/FunctSums.v +++ b/ftc/FunctSums.v @@ -38,8 +38,8 @@ (** printing FSum %\ensuremath{\sum}% #∑# *) (** printing FSumx %\ensuremath{\sum'}% #∑'&*) -Require Export CSumsReals. -Require Export PartFunEquality. +Require Export CoRN.reals.CSumsReals. +Require Export CoRN.ftc.PartFunEquality. Set Automatic Introduction. (** diff --git a/ftc/Integral.v b/ftc/Integral.v index d69ee94f..ef168cd5 100644 --- a/ftc/Integral.v +++ b/ftc/Integral.v @@ -34,7 +34,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export RefLemma. +Require Export CoRN.ftc.RefLemma. (** printing integral %\ensuremath{\int_I}% #∫I# *) (** printing Integral %\ensuremath{\int_I}% #∫I# *) diff --git a/ftc/IntegrationRules.v b/ftc/IntegrationRules.v index fbdbefbc..96cdeffd 100644 --- a/ftc/IntegrationRules.v +++ b/ftc/IntegrationRules.v @@ -19,8 +19,8 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Import FTC. -Require Export Composition. +Require Import CoRN.ftc.FTC. +Require Export CoRN.ftc.Composition. (** ** Integration by substitution diff --git a/ftc/IntervalFunct.v b/ftc/IntervalFunct.v index 469ceca2..9e5d9c2f 100644 --- a/ftc/IntervalFunct.v +++ b/ftc/IntervalFunct.v @@ -34,7 +34,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export PartFunEquality. +Require Export CoRN.ftc.PartFunEquality. Section Operations. diff --git a/ftc/MoreFunSeries.v b/ftc/MoreFunSeries.v index 3209b19b..0fc9ae98 100644 --- a/ftc/MoreFunSeries.v +++ b/ftc/MoreFunSeries.v @@ -34,8 +34,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export FunctSeries. -Require Export MoreFunctions. +Require Export CoRN.ftc.FunctSeries. +Require Export CoRN.ftc.MoreFunctions. (** printing FSeries_Sum %\ensuremath{\sum_{\infty}}% #∑'# *) diff --git a/ftc/MoreFunctions.v b/ftc/MoreFunctions.v index bad995a4..f932d676 100644 --- a/ftc/MoreFunctions.v +++ b/ftc/MoreFunctions.v @@ -36,7 +36,7 @@ (** printing FNorm %\ensuremath{\|\cdot\|_{\infty}}% *) -Require Export MoreIntervals. +Require Export CoRN.ftc.MoreIntervals. Opaque Min Max. diff --git a/ftc/MoreIntegrals.v b/ftc/MoreIntegrals.v index 0a705869..49948743 100644 --- a/ftc/MoreIntegrals.v +++ b/ftc/MoreIntegrals.v @@ -34,8 +34,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export Integral. -Require Export MoreFunctions. +Require Export CoRN.ftc.Integral. +Require Export CoRN.ftc.MoreFunctions. Section Lemmas. diff --git a/ftc/MoreIntervals.v b/ftc/MoreIntervals.v index 3d321015..484817df 100644 --- a/ftc/MoreIntervals.v +++ b/ftc/MoreIntervals.v @@ -34,7 +34,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export NthDerivative. +Require Export CoRN.ftc.NthDerivative. Opaque Min Max. diff --git a/ftc/NthDerivative.v b/ftc/NthDerivative.v index 4a39c946..2789462b 100644 --- a/ftc/NthDerivative.v +++ b/ftc/NthDerivative.v @@ -34,7 +34,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export Differentiability. +Require Export CoRN.ftc.Differentiability. Set Automatic Introduction. Section Nth_Derivative. diff --git a/ftc/PartFunEquality.v b/ftc/PartFunEquality.v index dd751b37..c8c0cc8a 100644 --- a/ftc/PartFunEquality.v +++ b/ftc/PartFunEquality.v @@ -36,8 +36,8 @@ (** printing Feq %\ensuremath{\approx}% #≈# *) -Require Export Intervals. -Require Export DiffTactics1. +Require Export CoRN.reals.Intervals. +Require Export CoRN.tactics.DiffTactics1. Section Definitions. diff --git a/ftc/PartInterval.v b/ftc/PartInterval.v index 3e6ff689..4f8d381f 100644 --- a/ftc/PartInterval.v +++ b/ftc/PartInterval.v @@ -34,7 +34,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export IntervalFunct. +Require Export CoRN.ftc.IntervalFunct. Section Conversion. diff --git a/ftc/Partitions.v b/ftc/Partitions.v index 2f80168b..87b9ec4b 100644 --- a/ftc/Partitions.v +++ b/ftc/Partitions.v @@ -34,7 +34,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export Continuity. +Require Export CoRN.ftc.Continuity. (** printing Partition_Sum %\ensuremath{\sum_P}% #∑P# *) diff --git a/ftc/RefLemma.v b/ftc/RefLemma.v index 36e05089..eee50ef1 100644 --- a/ftc/RefLemma.v +++ b/ftc/RefLemma.v @@ -34,9 +34,9 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export RefSeparating. -Require Export RefSeparated. -Require Export RefSepRef. +Require Export CoRN.ftc.RefSeparating. +Require Export CoRN.ftc.RefSeparated. +Require Export CoRN.ftc.RefSepRef. Section Refinement_Lemma. diff --git a/ftc/RefSepRef.v b/ftc/RefSepRef.v index dbe88cde..613d74ae 100644 --- a/ftc/RefSepRef.v +++ b/ftc/RefSepRef.v @@ -36,8 +36,8 @@ (* begin hide *) -Require Export COrdLemmas. -Require Export Partitions. +Require Export CoRN.ftc.COrdLemmas. +Require Export CoRN.ftc.Partitions. Section Refining_Separated. diff --git a/ftc/RefSeparated.v b/ftc/RefSeparated.v index 9a238f66..9f2d1724 100644 --- a/ftc/RefSeparated.v +++ b/ftc/RefSeparated.v @@ -36,8 +36,8 @@ (* begin hide *) -Require Export COrdLemmas. -Require Export Partitions. +Require Export CoRN.ftc.COrdLemmas. +Require Export CoRN.ftc.Partitions. Section Separating__Separated. diff --git a/ftc/RefSeparating.v b/ftc/RefSeparating.v index 34a4c5b5..06b9f6ad 100644 --- a/ftc/RefSeparating.v +++ b/ftc/RefSeparating.v @@ -36,8 +36,8 @@ (* begin hide *) -Require Export COrdLemmas. -Require Export Partitions. +Require Export CoRN.ftc.COrdLemmas. +Require Export CoRN.ftc.Partitions. Section Separating_Partition. diff --git a/ftc/Rolle.v b/ftc/Rolle.v index ba0503b7..a80cc766 100644 --- a/ftc/Rolle.v +++ b/ftc/Rolle.v @@ -34,8 +34,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export DiffTactics2. -Require Export MoreFunctions. +Require Export CoRN.tactics.DiffTactics2. +Require Export CoRN.ftc.MoreFunctions. Section Rolle. diff --git a/ftc/StrongIVT.v b/ftc/StrongIVT.v index 7e0c4bf3..f3b6a962 100644 --- a/ftc/StrongIVT.v +++ b/ftc/StrongIVT.v @@ -34,8 +34,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export WeakIVT. -Require Export CalculusTheorems. +Require Export CoRN.ftc.WeakIVT. +Require Export CoRN.ftc.CalculusTheorems. Section IVT'. diff --git a/ftc/Taylor.v b/ftc/Taylor.v index bf8a531e..d66ceee1 100644 --- a/ftc/Taylor.v +++ b/ftc/Taylor.v @@ -34,7 +34,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export TaylorLemma. +Require Export CoRN.ftc.TaylorLemma. Opaque Min Max N_Deriv. diff --git a/ftc/TaylorLemma.v b/ftc/TaylorLemma.v index 85a74529..7509bcf9 100644 --- a/ftc/TaylorLemma.v +++ b/ftc/TaylorLemma.v @@ -34,7 +34,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export Rolle. +Require Export CoRN.ftc.Rolle. Opaque Min. diff --git a/ftc/WeakIVT.v b/ftc/WeakIVT.v index e8103521..b13b1585 100644 --- a/ftc/WeakIVT.v +++ b/ftc/WeakIVT.v @@ -40,7 +40,7 @@ Infix "**" := prodT (at level 20). (* end hide *) -Require Export Continuity. +Require Export CoRN.ftc.Continuity. (** * IVT for Partial Functions diff --git a/ftc/WeakIVTQ.v b/ftc/WeakIVTQ.v index 3976db47..261d8243 100644 --- a/ftc/WeakIVTQ.v +++ b/ftc/WeakIVTQ.v @@ -7,7 +7,7 @@ Definition Q2R (q: Q) : IR := (inj_Q IR q). Coercion Q2R : Q >-> st_car. -Require Import Ring. +Require Import Coq.setoid_ring.Ring. Require Import CoRN.tactics.CornTac. Require Import CoRN.algebra.CRing_as_Ring. diff --git a/logic/CLogic.v b/logic/CLogic.v index c22171b9..72e49e51 100644 --- a/logic/CLogic.v +++ b/logic/CLogic.v @@ -44,12 +44,12 @@ (** printing or %\ensuremath{\mathrel\vee}% *) (** printing and %\ensuremath{\mathrel\wedge}% *) -Require Export Compare_dec. -Require Export CornBasics. -Require Export ZArith. -Require Export ZArithRing. -Require Export Div2. -Require Export Wf_nat. +Require Export Coq.Arith.Compare_dec. +Require Export CoRN.logic.CornBasics. +Require Export Coq.ZArith.ZArith. +Require Export Coq.setoid_ring.ZArithRing. +Require Export Coq.Arith.Div2. +Require Export Coq.Arith.Wf_nat. Set Automatic Introduction. diff --git a/logic/Classic.v b/logic/Classic.v index 56444f9d..19babd99 100644 --- a/logic/Classic.v +++ b/logic/Classic.v @@ -19,7 +19,7 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Import List. +Require Import CoRN.stdlib_omissions.List. (** * Classical Logic diff --git a/logic/CornBasics.v b/logic/CornBasics.v index 3c581d64..f6c436a5 100644 --- a/logic/CornBasics.v +++ b/logic/CornBasics.v @@ -45,13 +45,13 @@ (** printing nat %\ensuremath{\mathbb N}% #N# *) (** printing Z %\ensuremath{\mathbb Z}% #Z# *) -Require Export Omega. -Require Export Even. -Require Export Max. -Require Export Min. -Require Export List. -Require Import Eqdep_dec. -Require Import Setoid. +Require Export Coq.omega.Omega. +Require Export Coq.Arith.Even. +Require Export Coq.Arith.Max. +Require Export Coq.Arith.Min. +Require Export CoRN.stdlib_omissions.List. +Require Import Coq.Logic.Eqdep_dec. +Require Import Coq.Setoids.Setoid. Tactic Notation "apply" ":" constr(x) := pose proof x as HHH; first [ refine HHH | diff --git a/logic/Stability.v b/logic/Stability.v index a7c97341..97c2d0c4 100644 --- a/logic/Stability.v +++ b/logic/Stability.v @@ -1,5 +1,5 @@ -Require Import Morphisms. +Require Import Coq.Classes.Morphisms. (* Doubly-negated types as a monad: *) @@ -89,7 +89,7 @@ Class decision (P: Prop): Set := decide: { P } + { ~ P }. Lemma decision_stable P: decision P -> Stable P. Proof. firstorder. Qed. -Require Import CRreal Classic. +Require Import CoRN.model.reals.CRreal CoRN.logic.Classic. Lemma Qle_dec x y: decision (Qle x y). intros. diff --git a/metric2/Classification.v b/metric2/Classification.v index f84c7438..cfa1d0b6 100644 --- a/metric2/Classification.v +++ b/metric2/Classification.v @@ -18,8 +18,8 @@ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Export Metric. -Require Import Qauto. +Require Export CoRN.metric2.Metric. +Require Import CoRN.tactics.Qauto. Open Local Scope Q_scope. diff --git a/metric2/Compact.v b/metric2/Compact.v index 79d409bd..5c5ede39 100644 --- a/metric2/Compact.v +++ b/metric2/Compact.v @@ -18,16 +18,16 @@ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Import Limit. -Require Export FinEnum. -Require Import Zpow_facts. -Require Export Complete. -Require Import Classic. -Require Import COrdFields2. -Require Import Qordfield. -Require Import Qpower. -Require Import Qauto. -Require Import CornTac. +Require Import CoRN.metric2.Limit. +Require Export CoRN.metric2.FinEnum. +Require Import Coq.ZArith.Zpow_facts. +Require Export CoRN.metric2.Complete. +Require Import CoRN.logic.Classic. +Require Import CoRN.algebra.COrdFields2. +Require Import CoRN.model.ordfields.Qordfield. +Require Import Coq.QArith.Qpower. +Require Import CoRN.tactics.Qauto. +Require Import CoRN.tactics.CornTac. Set Implicit Arguments. Set Automatic Introduction. @@ -1340,7 +1340,7 @@ End Isomorphism. End Compact. -Require Import Prelength. +Require Import CoRN.metric2.Prelength. Section CompactDistr. diff --git a/metric2/Complete.v b/metric2/Complete.v index 14155328..c4fa32c1 100644 --- a/metric2/Complete.v +++ b/metric2/Complete.v @@ -19,15 +19,15 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Export UniformContinuity. -Require Export QposInf. -Require Export Classification. -Require Import QposMinMax. -Require Import QMinMax. -Require Import Qauto. -Require Import Qordfield. -Require Import COrdFields2. -Require Import CornTac. +Require Export CoRN.metric2.UniformContinuity. +Require Export CoRN.model.structures.QposInf. +Require Export CoRN.metric2.Classification. +Require Import CoRN.model.totalorder.QposMinMax. +Require Import CoRN.model.totalorder.QMinMax. +Require Import CoRN.tactics.Qauto. +Require Import CoRN.model.ordfields.Qordfield. +Require Import CoRN.algebra.COrdFields2. +Require Import CoRN.tactics.CornTac. Set Implicit Arguments. diff --git a/metric2/CompleteProduct.v b/metric2/CompleteProduct.v index 43a783ad..4eef6957 100644 --- a/metric2/CompleteProduct.v +++ b/metric2/CompleteProduct.v @@ -18,9 +18,9 @@ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Export ProductMetric. -Require Export Complete. -Require Import Qauto. +Require Export CoRN.metric2.ProductMetric. +Require Export CoRN.metric2.Complete. +Require Import CoRN.tactics.Qauto. Set Implicit Arguments. diff --git a/metric2/DistanceMetricSpace.v b/metric2/DistanceMetricSpace.v index 70c4855d..854acb06 100644 --- a/metric2/DistanceMetricSpace.v +++ b/metric2/DistanceMetricSpace.v @@ -1,5 +1,5 @@ -Require NNUpperR. +Require CoRN.model.structures.NNUpperR. Import NNUpperR.notations. Import QnonNeg.notations. diff --git a/metric2/FinEnum.v b/metric2/FinEnum.v index 34eb1284..d7cc0342 100644 --- a/metric2/FinEnum.v +++ b/metric2/FinEnum.v @@ -18,15 +18,15 @@ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Export Hausdorff. -Require Import Classic. -Require Export List. -Require Export Classification. -Require Import Complete. -Require Import Prelength. -Require Import CornBasics. -Require Import Qauto. -Require Import CornTac. +Require Export CoRN.metric2.Hausdorff. +Require Import CoRN.logic.Classic. +Require Export CoRN.stdlib_omissions.List. +Require Export CoRN.metric2.Classification. +Require Import CoRN.metric2.Complete. +Require Import CoRN.metric2.Prelength. +Require Import CoRN.logic.CornBasics. +Require Import CoRN.tactics.Qauto. +Require Import CoRN.tactics.CornTac. Set Implicit Arguments. diff --git a/metric2/Graph.v b/metric2/Graph.v index 285952dc..699b33e2 100644 --- a/metric2/Graph.v +++ b/metric2/Graph.v @@ -18,15 +18,15 @@ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Export UniformContinuity. -Require Export Compact. -Require Export Prelength. -Require Export CompleteProduct. -Require Import QposMinMax. -Require Import QMinMax. -Require Import Classic. -Require Import Qauto. -Require Import CornTac. +Require Export CoRN.metric2.UniformContinuity. +Require Export CoRN.metric2.Compact. +Require Export CoRN.metric2.Prelength. +Require Export CoRN.metric2.CompleteProduct. +Require Import CoRN.model.totalorder.QposMinMax. +Require Import CoRN.model.totalorder.QMinMax. +Require Import CoRN.logic.Classic. +Require Import CoRN.tactics.Qauto. +Require Import CoRN.tactics.CornTac. Set Implicit Arguments. @@ -336,7 +336,7 @@ Hypothesis stableXY : stableMetric XY. Definition CompactGraph_b (plFEX:PrelengthSpace (FinEnum stableX)) : Compact stableX --> Compact stableXY := CompactImage_b (1#1) _ plFEX graphPoint_b. -Require Import Qordfield. +Require Import CoRN.model.ordfields.Qordfield. Lemma CompactGraph_b_correct1 : forall plX plFEX x s, (inCompact x s) -> inCompact (Couple (x,(Cbind plX f x))) (CompactGraph_b plFEX s). Proof. diff --git a/metric2/Hausdorff.v b/metric2/Hausdorff.v index 5c7a8585..cc49a820 100644 --- a/metric2/Hausdorff.v +++ b/metric2/Hausdorff.v @@ -18,16 +18,16 @@ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Import ZBasics. -Require Import Classic. +Require Import CoRN.model.Zmod.ZBasics. +Require Import CoRN.logic.Classic. Require Export CoRN.metric2.Metric. -Require Import Classification. +Require Import CoRN.metric2.Classification. Require Import Coq.Lists.List. -Require Import ZArith. -Require Import QMinMax. -Require Import QposMinMax. -Require Import Qauto. -Require Import CornTac. +Require Import Coq.ZArith.ZArith. +Require Import CoRN.model.totalorder.QMinMax. +Require Import CoRN.model.totalorder.QposMinMax. +Require Import CoRN.tactics.Qauto. +Require Import CoRN.tactics.CornTac. Open Local Scope Q_scope. diff --git a/metric2/Limit.v b/metric2/Limit.v index cd21ffdb..ad6968de 100644 --- a/metric2/Limit.v +++ b/metric2/Limit.v @@ -19,11 +19,11 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Import QArith. +Require Import Coq.QArith.QArith. Require Import Coq.Bool.Bool. -Require Export Complete. +Require Export CoRN.metric2.Complete. Require Export Coq.Lists.Streams. -Require Import abstract_algebra theory.streams orders.naturals. +Require Import MathClasses.interfaces.abstract_algebra MathClasses.theory.streams MathClasses.orders.naturals. (** ** Limits diff --git a/metric2/Metric.v b/metric2/Metric.v index 241bb556..bb8c2b4f 100644 --- a/metric2/Metric.v +++ b/metric2/Metric.v @@ -19,17 +19,17 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Export RSetoid. -Require Import Relation_Definitions. -Require Export Qpossec. -Require Import COrdFields2. -Require Import Qordfield. -Require Import QMinMax. -Require Import List. -Require Import CornTac. -Require Import stdlib_omissions.Q. - -Require QnnInf. +Require Export CoRN.algebra.RSetoid. +Require Import Coq.Relations.Relation_Definitions. +Require Export CoRN.model.structures.Qpossec. +Require Import CoRN.algebra.COrdFields2. +Require Import CoRN.model.ordfields.Qordfield. +Require Import CoRN.model.totalorder.QMinMax. +Require Import CoRN.stdlib_omissions.List. +Require Import CoRN.tactics.CornTac. +Require Import CoRN.stdlib_omissions.Q. + +Require CoRN.model.structures.QnnInf. Import QnnInf.notations. Open Local Scope Q_scope. diff --git a/metric2/MetricMorphisms.v b/metric2/MetricMorphisms.v index c32b7e54..fcb2a0b6 100644 --- a/metric2/MetricMorphisms.v +++ b/metric2/MetricMorphisms.v @@ -1,11 +1,11 @@ Require - theory.jections. + MathClasses.theory.jections. Require Import - Setoid CornTac - stdlib_omissions.Q QMinMax QposMinMax Qposclasses - RSetoid CSetoids - Complete Prelength - abstract_algebra. + Coq.Setoids.Setoid CoRN.tactics.CornTac + CoRN.stdlib_omissions.Q CoRN.model.totalorder.QMinMax CoRN.model.totalorder.QposMinMax CoRN.classes.Qposclasses + CoRN.algebra.RSetoid CoRN.algebra.CSetoids + CoRN.metric2.Complete CoRN.metric2.Prelength + MathClasses.interfaces.abstract_algebra. Open Local Scope uc_scope. diff --git a/metric2/Prelength.v b/metric2/Prelength.v index cf35fa48..4613cdee 100644 --- a/metric2/Prelength.v +++ b/metric2/Prelength.v @@ -19,16 +19,16 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Export Metric. -Require Import UniformContinuity. -Require Import Complete. -Require Import COrdFields2. -Require Import Qordfield. -Require Import QMinMax. -Require Import QposMinMax. -Require Import List. -Require Import CornTac. -Require Import Qauto. +Require Export CoRN.metric2.Metric. +Require Import CoRN.metric2.UniformContinuity. +Require Import CoRN.metric2.Complete. +Require Import CoRN.algebra.COrdFields2. +Require Import CoRN.model.ordfields.Qordfield. +Require Import CoRN.model.totalorder.QMinMax. +Require Import CoRN.model.totalorder.QposMinMax. +Require Import CoRN.stdlib_omissions.List. +Require Import CoRN.tactics.CornTac. +Require Import CoRN.tactics.Qauto. Set Implicit Arguments. Set Automatic Introduction. diff --git a/metric2/ProductMetric.v b/metric2/ProductMetric.v index 8a1ae833..8f4104c0 100644 --- a/metric2/ProductMetric.v +++ b/metric2/ProductMetric.v @@ -18,12 +18,12 @@ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Export Metric. -Require Import Classification. -Require Import UniformContinuity. -Require Import Prelength. -Require Import Complete. -Require Import CornTac. +Require Export CoRN.metric2.Metric. +Require Import CoRN.metric2.Classification. +Require Import CoRN.metric2.UniformContinuity. +Require Import CoRN.metric2.Prelength. +Require Import CoRN.metric2.Complete. +Require Import CoRN.tactics.CornTac. Set Implicit Arguments. @@ -313,7 +313,7 @@ End completion_distributes. (** The diagonal function [x ⟼ (x,x)] is a uniformly continuous function from a metric space X to the product space [X × X] *) Section diag. - Require Import Unicode.Utf8. + Require Import Coq.Unicode.Utf8. Variable X:MetricSpace. Definition diag_raw : X → (ProductMS X X) := λ x, (x,x). diff --git a/metric2/StepFunction.v b/metric2/StepFunction.v index 1c6a7fc6..3d03b310 100644 --- a/metric2/StepFunction.v +++ b/metric2/StepFunction.v @@ -18,11 +18,11 @@ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Import OpenUnit. -Require Import CornTac. -Require Import Qauto. -Require Import Qordfield. -Require Import COrdFields. +Require Import CoRN.model.structures.OpenUnit. +Require Import CoRN.tactics.CornTac. +Require Import CoRN.tactics.Qauto. +Require Import CoRN.model.ordfields.Qordfield. +Require Import CoRN.algebra.COrdFields. Set Implicit Arguments. diff --git a/metric2/StepFunctionMonad.v b/metric2/StepFunctionMonad.v index eeb66ece..a57ff62f 100644 --- a/metric2/StepFunctionMonad.v +++ b/metric2/StepFunctionMonad.v @@ -20,10 +20,10 @@ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Export StepFunctionSetoid. -Require Import OpenUnit. -Require Import CornTac. -Require Import CornBasics. +Require Export CoRN.metric2.StepFunctionSetoid. +Require Import CoRN.model.structures.OpenUnit. +Require Import CoRN.tactics.CornTac. +Require Import CoRN.logic.CornBasics. (** ** Monad Here we define bind and join for the step function monad, and prove that they diff --git a/metric2/StepFunctionSetoid.v b/metric2/StepFunctionSetoid.v index 2e8ed050..d6b393e4 100644 --- a/metric2/StepFunctionSetoid.v +++ b/metric2/StepFunctionSetoid.v @@ -18,13 +18,13 @@ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Export RSetoid. -Require Export StepFunction. -Require Import OpenUnit. -Require Import CornTac. -Require Import Qauto. -Require Import Qordfield. -Require Import COrdFields. +Require Export CoRN.algebra.RSetoid. +Require Export CoRN.metric2.StepFunction. +Require Import CoRN.model.structures.OpenUnit. +Require Import CoRN.tactics.CornTac. +Require Import CoRN.tactics.Qauto. +Require Import CoRN.model.ordfields.Qordfield. +Require Import CoRN.algebra.COrdFields. Set Implicit Arguments. Set Automatic Introduction. diff --git a/metric2/UCFnMonoid.v b/metric2/UCFnMonoid.v index 2e66c8c3..c2b2b5c7 100644 --- a/metric2/UCFnMonoid.v +++ b/metric2/UCFnMonoid.v @@ -1,4 +1,4 @@ -Require Import Utf8 Coq.Lists.Streams UniformContinuity abstract_algebra. +Require Import Coq.Unicode.Utf8 Coq.Lists.Streams CoRN.metric2.UniformContinuity MathClasses.interfaces.abstract_algebra. (** Uniform continuous maps from a metric space to itself (endomaps) diff --git a/metric2/UniformContinuity.v b/metric2/UniformContinuity.v index 4957113b..5ccbba2c 100644 --- a/metric2/UniformContinuity.v +++ b/metric2/UniformContinuity.v @@ -19,10 +19,10 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Export Metric. -Require Export QposInf. -Require Import List. -Require Import CornTac. +Require Export CoRN.metric2.Metric. +Require Export CoRN.model.structures.QposInf. +Require Import CoRN.stdlib_omissions.List. +Require Import CoRN.tactics.CornTac. Set Implicit Arguments. diff --git a/metrics/CMetricSpaces.v b/metrics/CMetricSpaces.v index 56e7046f..9398e496 100644 --- a/metrics/CMetricSpaces.v +++ b/metrics/CMetricSpaces.v @@ -34,8 +34,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export Prod_Sub. -Require Export Equiv. +Require Export CoRN.metrics.Prod_Sub. +Require Export CoRN.metrics.Equiv. Set Automatic Introduction. Section Definition_MS. diff --git a/metrics/CPMSTheory.v b/metrics/CPMSTheory.v index edc79a77..e95f5d4f 100644 --- a/metrics/CPMSTheory.v +++ b/metrics/CPMSTheory.v @@ -34,7 +34,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export Prod_Sub. +Require Export CoRN.metrics.Prod_Sub. Set Automatic Introduction. Section lists. diff --git a/metrics/CPseudoMSpaces.v b/metrics/CPseudoMSpaces.v index 2528c8a5..c9451512 100644 --- a/metrics/CPseudoMSpaces.v +++ b/metrics/CPseudoMSpaces.v @@ -34,7 +34,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export Intervals. +Require Export CoRN.reals.Intervals. (** * Metric Spaces (traditional) diff --git a/metrics/ContFunctions.v b/metrics/ContFunctions.v index f5e7ba71..ff823f1d 100644 --- a/metrics/ContFunctions.v +++ b/metrics/ContFunctions.v @@ -34,7 +34,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export CPseudoMSpaces. +Require Export CoRN.metrics.CPseudoMSpaces. Section Continuous_functions. (** diff --git a/metrics/Equiv.v b/metrics/Equiv.v index 50125f0f..d5db8c22 100644 --- a/metrics/Equiv.v +++ b/metrics/Equiv.v @@ -34,7 +34,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export IR_CPMSpace. +Require Export CoRN.metrics.IR_CPMSpace. Section equivalent. (** diff --git a/metrics/IR_CPMSpace.v b/metrics/IR_CPMSpace.v index 8c8d4aa8..4d59009b 100644 --- a/metrics/IR_CPMSpace.v +++ b/metrics/IR_CPMSpace.v @@ -34,7 +34,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export ContFunctions. +Require Export CoRN.metrics.ContFunctions. Section Reals. (** diff --git a/metrics/LipExt.v b/metrics/LipExt.v index 4fb33b99..09231258 100644 --- a/metrics/LipExt.v +++ b/metrics/LipExt.v @@ -50,9 +50,9 @@ subset X. *) -Require Import ContFunctions. -Require Import CMetricSpaces. -Require Import CPMSTheory. +Require Import CoRN.metrics.ContFunctions. +Require Import CoRN.metrics.CMetricSpaces. +Require Import CoRN.metrics.CPMSTheory. Section LipschitzExtension. diff --git a/metrics/Prod_Sub.v b/metrics/Prod_Sub.v index 0408806c..9828046f 100644 --- a/metrics/Prod_Sub.v +++ b/metrics/Prod_Sub.v @@ -34,7 +34,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export IR_CPMSpace. +Require Export CoRN.metrics.IR_CPMSpace. Set Automatic Introduction. Section prodpsmetrics. diff --git a/model/Zmod/Cmod.v b/model/Zmod/Cmod.v index 0d4d8bea..4cc8f2b3 100644 --- a/model/Zmod/Cmod.v +++ b/model/Zmod/Cmod.v @@ -34,8 +34,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export ZMod. -Require Export CLogic. +Require Export CoRN.model.Zmod.ZMod. +Require Export CoRN.logic.CLogic. (** * CProp-valued lemmas about 'mod' diff --git a/model/Zmod/IrrCrit.v b/model/Zmod/IrrCrit.v index 415f9839..509f85f4 100644 --- a/model/Zmod/IrrCrit.v +++ b/model/Zmod/IrrCrit.v @@ -40,9 +40,9 @@ (** printing [+X*] %\ensuremath{+ X*}% #&+ X*;# *) -Require Export Zm. -Require Export Zring. -Require Export CPoly_Degree. +Require Export CoRN.model.Zmod.Zm. +Require Export CoRN.model.rings.Zring. +Require Export CoRN.algebra.CPoly_Degree. (** * An irreducibility criterion diff --git a/model/Zmod/ZBasics.v b/model/Zmod/ZBasics.v index 3c9b9f6f..45043160 100644 --- a/model/Zmod/ZBasics.v +++ b/model/Zmod/ZBasics.v @@ -35,8 +35,8 @@ *) (* ZBasics.v, by Vince Barany *) -Require Export ZArith. -Require Export CLogic. +Require Export Coq.ZArith.ZArith. +Require Export CoRN.logic.CLogic. (** * Basic facts on Z diff --git a/model/Zmod/ZDivides.v b/model/Zmod/ZDivides.v index 758c51fb..c50e62a7 100644 --- a/model/Zmod/ZDivides.v +++ b/model/Zmod/ZDivides.v @@ -35,7 +35,7 @@ *) (* ZDivides.v, by Vince Barany *) -Require Export ZBasics. +Require Export CoRN.model.Zmod.ZBasics. (** * The Divides-function over Z diff --git a/model/Zmod/ZGcd.v b/model/Zmod/ZGcd.v index bfc7ab3e..3d01ac82 100644 --- a/model/Zmod/ZGcd.v +++ b/model/Zmod/ZGcd.v @@ -35,7 +35,7 @@ *) (* ZGcd.v, by Vince Barany *) -Require Export ZDivides. +Require Export CoRN.model.Zmod.ZDivides. Require Export Coq.Init.Wf. (** diff --git a/model/Zmod/ZMod.v b/model/Zmod/ZMod.v index 756988a4..709df19a 100644 --- a/model/Zmod/ZMod.v +++ b/model/Zmod/ZMod.v @@ -35,7 +35,7 @@ *) (* ZMod.v, by Vince Barany *) -Require Export ZGcd. +Require Export CoRN.model.Zmod.ZGcd. (** diff --git a/model/Zmod/Zm.v b/model/Zmod/Zm.v index 2c7d017a..4a5db988 100644 --- a/model/Zmod/Zm.v +++ b/model/Zmod/Zm.v @@ -35,8 +35,8 @@ *) (* Zm.v, by Vince Barany *) -Require Export ZMod. -Require Export CFields. +Require Export CoRN.model.Zmod.ZMod. +Require Export CoRN.algebra.CFields. (** * Zm diff --git a/model/abgroups/CRabgroup.v b/model/abgroups/CRabgroup.v index d3a332f2..ee9bfb90 100644 --- a/model/abgroups/CRabgroup.v +++ b/model/abgroups/CRabgroup.v @@ -19,10 +19,10 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Export CRgroup. -Require Import CRcorrect. -Require Export CAbGroups. -Require Import CornTac. +Require Export CoRN.model.groups.CRgroup. +Require Import CoRN.reals.fast.CRcorrect. +Require Export CoRN.algebra.CAbGroups. +Require Import CoRN.tactics.CornTac. (** ** Example of a abelian group: $\langle$#⟨#[CR],[+]$\rangle$#⟩# diff --git a/model/abgroups/QSposabgroup.v b/model/abgroups/QSposabgroup.v index be5deba5..d1f3acdf 100644 --- a/model/abgroups/QSposabgroup.v +++ b/model/abgroups/QSposabgroup.v @@ -35,8 +35,8 @@ *) -Require Export QSposgroup. -Require Import CAbGroups. +Require Export CoRN.model.groups.QSposgroup. +Require Import CoRN.algebra.CAbGroups. (** ** Example of an abelian group: $\langle$#⟨#[Qpos],$(x,y) \mapsto xy/2$ #(x,y) ↦ xy/2#$\rangle$#⟩# diff --git a/model/abgroups/Qabgroup.v b/model/abgroups/Qabgroup.v index 60fb3849..85915f5e 100644 --- a/model/abgroups/Qabgroup.v +++ b/model/abgroups/Qabgroup.v @@ -34,8 +34,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export Qgroup. -Require Import CAbGroups. +Require Export CoRN.model.groups.Qgroup. +Require Import CoRN.algebra.CAbGroups. (** ** Example of an abelian group: $\langle$#⟨#[Q],[[+]]$\rangle$#⟩# diff --git a/model/abgroups/Qposabgroup.v b/model/abgroups/Qposabgroup.v index be2ed80c..7dcbefcf 100644 --- a/model/abgroups/Qposabgroup.v +++ b/model/abgroups/Qposabgroup.v @@ -35,8 +35,8 @@ *) -Require Export Qposgroup. -Require Import CAbGroups. +Require Export CoRN.model.groups.Qposgroup. +Require Import CoRN.algebra.CAbGroups. (** ** Example of an abelian group: $\langle$#⟨#[Qpos],[[*]]$\rangle$#⟩# diff --git a/model/abgroups/Zabgroup.v b/model/abgroups/Zabgroup.v index a920b74d..dcc95c8f 100644 --- a/model/abgroups/Zabgroup.v +++ b/model/abgroups/Zabgroup.v @@ -35,8 +35,8 @@ *) -Require Export Zgroup. -Require Import CAbGroups. +Require Export CoRN.model.groups.Zgroup. +Require Import CoRN.algebra.CAbGroups. (** ** Example of an abelian group: $\langle$#⟨#[Z],[[+]]$\rangle$#⟩# diff --git a/model/fields/CRfield.v b/model/fields/CRfield.v index 03cf3ee8..4b9e303d 100644 --- a/model/fields/CRfield.v +++ b/model/fields/CRfield.v @@ -19,11 +19,11 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Export CRFieldOps. -Require Export CRring. -Require Export CFields. -Require Import CRcorrect. -Require Import CornTac. +Require Export CoRN.reals.fast.CRFieldOps. +Require Export CoRN.model.rings.CRring. +Require Export CoRN.algebra.CFields. +Require Import CoRN.reals.fast.CRcorrect. +Require Import CoRN.tactics.CornTac. (** ** Example of a field: $\langle$#⟨#[CR],[+],[*]$\rangle$#⟩# diff --git a/model/fields/Qfield.v b/model/fields/Qfield.v index b5706ee5..b1785a06 100644 --- a/model/fields/Qfield.v +++ b/model/fields/Qfield.v @@ -34,8 +34,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export Qring. -Require Import CFields. +Require Export CoRN.model.rings.Qring. +Require Import CoRN.algebra.CFields. (** ** Example of a field: $\langle$#⟨#[Q],[[+]],[[*]]$\rangle$#⟩# diff --git a/model/groups/CRgroup.v b/model/groups/CRgroup.v index f88873ff..05ac00e2 100644 --- a/model/groups/CRgroup.v +++ b/model/groups/CRgroup.v @@ -19,10 +19,10 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Export CRGroupOps. -Require Export CRmonoid. -Require Import CRcorrect. -Require Import CornTac. +Require Export CoRN.reals.fast.CRGroupOps. +Require Export CoRN.model.monoids.CRmonoid. +Require Import CoRN.reals.fast.CRcorrect. +Require Import CoRN.tactics.CornTac. (** ** Example of a group: $\langle$#⟨#[CR],[+]$\rangle$#⟩# diff --git a/model/groups/QSposgroup.v b/model/groups/QSposgroup.v index 2a16d0fb..4a3b430b 100644 --- a/model/groups/QSposgroup.v +++ b/model/groups/QSposgroup.v @@ -34,8 +34,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export QSposmonoid. -Require Import CGroups. +Require Export CoRN.model.monoids.QSposmonoid. +Require Import CoRN.algebra.CGroups. (** ** Example of a group: $\langle$#⟨#[Qpos],$(x,y) \mapsto xy/2$ #(x,y) ↦ xy/2#$\rangle$#⟩# diff --git a/model/groups/Qgroup.v b/model/groups/Qgroup.v index d25f53ee..c81a6773 100644 --- a/model/groups/Qgroup.v +++ b/model/groups/Qgroup.v @@ -34,8 +34,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export Qmonoid. -Require Import CGroups. +Require Export CoRN.model.monoids.Qmonoid. +Require Import CoRN.algebra.CGroups. (** ** Example of a group: $\langle$#⟨#[Q],[[+]]$\rangle$#⟩# diff --git a/model/groups/Qposgroup.v b/model/groups/Qposgroup.v index a75ec2e5..caeebcf8 100644 --- a/model/groups/Qposgroup.v +++ b/model/groups/Qposgroup.v @@ -34,8 +34,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export Qposmonoid. -Require Export CGroups. +Require Export CoRN.model.monoids.Qposmonoid. +Require Export CoRN.algebra.CGroups. (** ** Example of a group: $\langle$#⟨#[Qpos],[[*]]$\rangle$#⟩# diff --git a/model/groups/Zgroup.v b/model/groups/Zgroup.v index 843690a8..6c7e1b99 100644 --- a/model/groups/Zgroup.v +++ b/model/groups/Zgroup.v @@ -35,8 +35,8 @@ *) -Require Export Zmonoid. -Require Import CGroups. +Require Export CoRN.model.monoids.Zmonoid. +Require Import CoRN.algebra.CGroups. (** ** Example of a group: $\langle$#⟨#[Z],[[+]]$\rangle$#⟩# diff --git a/model/lattice/CRlattice.v b/model/lattice/CRlattice.v index e93e0a59..54e33f43 100644 --- a/model/lattice/CRlattice.v +++ b/model/lattice/CRlattice.v @@ -19,8 +19,8 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Export CRpartialorder. -Require Import Lattice. +Require Export CoRN.model.partialorder.CRpartialorder. +Require Import CoRN.order.Lattice. (** ** Example of a Lattice: diff --git a/model/metric2/BoundedFunction.v b/model/metric2/BoundedFunction.v index a1750e3a..7eda1e1f 100644 --- a/model/metric2/BoundedFunction.v +++ b/model/metric2/BoundedFunction.v @@ -19,11 +19,11 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Export Complete. -Require Import CRmetric. -Require Import LinfMetric. -Require Import Qmetric. -Require Import CornTac. +Require Export CoRN.metric2.Complete. +Require Import CoRN.model.metric2.CRmetric. +Require Import CoRN.model.metric2.LinfMetric. +Require Import CoRN.model.metric2.Qmetric. +Require Import CoRN.tactics.CornTac. Set Implicit Arguments. diff --git a/model/metric2/CRmetric.v b/model/metric2/CRmetric.v index 6e05a0c3..0b66059e 100644 --- a/model/metric2/CRmetric.v +++ b/model/metric2/CRmetric.v @@ -19,12 +19,12 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Export Complete. -Require Export Prelength. -Require Import Qmetric. -Require Import CornTac. -Require Import canonical_names. -Require Import stdlib_rationals. +Require Export CoRN.metric2.Complete. +Require Export CoRN.metric2.Prelength. +Require Import CoRN.model.metric2.Qmetric. +Require Import CoRN.tactics.CornTac. +Require Import MathClasses.interfaces.canonical_names. +Require Import MathClasses.implementations.stdlib_rationals. Set Implicit Arguments. diff --git a/model/metric2/IntegrableFunction.v b/model/metric2/IntegrableFunction.v index 96476cd5..7f39cde2 100644 --- a/model/metric2/IntegrableFunction.v +++ b/model/metric2/IntegrableFunction.v @@ -19,13 +19,13 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Export Complete. -Require Import CRmetric. -Require Import L1metric. -Require Import LinfMetric. -Require Import Qmetric. -Require Import CornTac. -Require Import BoundedFunction. +Require Export CoRN.metric2.Complete. +Require Import CoRN.model.metric2.CRmetric. +Require Import CoRN.model.metric2.L1metric. +Require Import CoRN.model.metric2.LinfMetric. +Require Import CoRN.model.metric2.Qmetric. +Require Import CoRN.tactics.CornTac. +Require Import CoRN.model.metric2.BoundedFunction. Set Implicit Arguments. diff --git a/model/metric2/L1metric.v b/model/metric2/L1metric.v index 072fc2d4..fbccda1d 100644 --- a/model/metric2/L1metric.v +++ b/model/metric2/L1metric.v @@ -18,17 +18,17 @@ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Export StepQsec. -Require Export UniformContinuity. -Require Import Prelength. -Require Import OpenUnit. -Require Import QArith. -Require Import QMinMax. -Require Import Qabs. -Require Import Qordfield. -Require Import Qmetric. -Require Import COrdFields2. -Require Import CornTac. +Require Export CoRN.model.structures.StepQsec. +Require Export CoRN.metric2.UniformContinuity. +Require Import CoRN.metric2.Prelength. +Require Import CoRN.model.structures.OpenUnit. +Require Import Coq.QArith.QArith. +Require Import CoRN.model.totalorder.QMinMax. +Require Import Coq.QArith.Qabs. +Require Import CoRN.model.ordfields.Qordfield. +Require Import CoRN.model.metric2.Qmetric. +Require Import CoRN.algebra.COrdFields2. +Require Import CoRN.tactics.CornTac. Set Implicit Arguments. diff --git a/model/metric2/LinfDistMonad.v b/model/metric2/LinfDistMonad.v index 46ba0b28..fd2b48d2 100644 --- a/model/metric2/LinfDistMonad.v +++ b/model/metric2/LinfDistMonad.v @@ -20,13 +20,13 @@ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Export StepFunctionMonad. -Require Import OpenUnit. -Require Import CornTac. -Require Import Complete. -Require Export LinfMetricMonad. -Require Export StepFunctionSetoid. -Require Import Qauto. +Require Export CoRN.metric2.StepFunctionMonad. +Require Import CoRN.model.structures.OpenUnit. +Require Import CoRN.tactics.CornTac. +Require Import CoRN.metric2.Complete. +Require Export CoRN.model.metric2.LinfMetricMonad. +Require Export CoRN.metric2.StepFunctionSetoid. +Require Import CoRN.tactics.Qauto. (** ** Completion distributes over Step Functions We prove the that StepF distributes over Complete using the function diff --git a/model/metric2/LinfMetric.v b/model/metric2/LinfMetric.v index 302ab633..cf4fe367 100644 --- a/model/metric2/LinfMetric.v +++ b/model/metric2/LinfMetric.v @@ -19,18 +19,18 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Export StepQsec. -Require Import Prelength. -Require Import L1metric. -Require Export LinfMetricMonad. -Require Import OpenUnit. -Require Import QArith. -Require Import QMinMax. -Require Import Qabs. -Require Import Qordfield. -Require Import Qmetric. -Require Import COrdFields2. -Require Import CornTac. +Require Export CoRN.model.structures.StepQsec. +Require Import CoRN.metric2.Prelength. +Require Import CoRN.model.metric2.L1metric. +Require Export CoRN.model.metric2.LinfMetricMonad. +Require Import CoRN.model.structures.OpenUnit. +Require Import Coq.QArith.QArith. +Require Import CoRN.model.totalorder.QMinMax. +Require Import Coq.QArith.Qabs. +Require Import CoRN.model.ordfields.Qordfield. +Require Import CoRN.model.metric2.Qmetric. +Require Import CoRN.algebra.COrdFields2. +Require Import CoRN.tactics.CornTac. Set Implicit Arguments. diff --git a/model/metric2/LinfMetricMonad.v b/model/metric2/LinfMetricMonad.v index d496c770..faf64e69 100644 --- a/model/metric2/LinfMetricMonad.v +++ b/model/metric2/LinfMetricMonad.v @@ -21,18 +21,18 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Export StepFunctionSetoid. -Require Import StepFunctionMonad. -Require Import UniformContinuity. -Require Import OpenUnit. -Require Import QArith. -Require Import QMinMax. -Require Import Qabs. -Require Import Qordfield. -Require Import Qmetric. -Require Import Prelength. -Require Import COrdFields2. -Require Import CornTac. +Require Export CoRN.metric2.StepFunctionSetoid. +Require Import CoRN.metric2.StepFunctionMonad. +Require Import CoRN.metric2.UniformContinuity. +Require Import CoRN.model.structures.OpenUnit. +Require Import Coq.QArith.QArith. +Require Import CoRN.model.totalorder.QMinMax. +Require Import Coq.QArith.Qabs. +Require Import CoRN.model.ordfields.Qordfield. +Require Import CoRN.model.metric2.Qmetric. +Require Import CoRN.metric2.Prelength. +Require Import CoRN.algebra.COrdFields2. +Require Import CoRN.tactics.CornTac. Set Implicit Arguments. Set Automatic Introduction. diff --git a/model/metric2/Qmetric.v b/model/metric2/Qmetric.v index 747e79bc..764f1f20 100644 --- a/model/metric2/Qmetric.v +++ b/model/metric2/Qmetric.v @@ -18,15 +18,15 @@ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Export Metric. -Require Import Prelength. -Require Import Classification. -Require Import QMinMax. -Require Import COrdAbs. -Require Import Qordfield. -Require Import Qabs. -Require Import CornTac. -Require Import UniformContinuity. +Require Export CoRN.metric2.Metric. +Require Import CoRN.metric2.Prelength. +Require Import CoRN.metric2.Classification. +Require Import CoRN.model.totalorder.QMinMax. +Require Import CoRN.algebra.COrdAbs. +Require Import CoRN.model.ordfields.Qordfield. +Require Import Coq.QArith.Qabs. +Require Import CoRN.tactics.CornTac. +Require Import CoRN.metric2.UniformContinuity. Set Implicit Arguments. Set Automatic Introduction. @@ -368,7 +368,7 @@ Proof with auto. apply ball_sym... Qed. -Require Import Qround. +Require Import Coq.QArith.Qround. Lemma Qfloor_ball q: Qball (1#2) (Qfloor q + (1#2)) q. diff --git a/model/monoids/CRmonoid.v b/model/monoids/CRmonoid.v index 45339675..8908d434 100644 --- a/model/monoids/CRmonoid.v +++ b/model/monoids/CRmonoid.v @@ -19,10 +19,10 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Export CRGroupOps. -Require Export CRsemigroup. -Require Import CRcorrect. -Require Import CornTac. +Require Export CoRN.reals.fast.CRGroupOps. +Require Export CoRN.model.semigroups.CRsemigroup. +Require Import CoRN.reals.fast.CRcorrect. +Require Import CoRN.tactics.CornTac. Open Local Scope uc_scope. diff --git a/model/monoids/Nm_to_cycm.v b/model/monoids/Nm_to_cycm.v index 2e61e461..0afbf92d 100644 --- a/model/monoids/Nm_to_cycm.v +++ b/model/monoids/Nm_to_cycm.v @@ -34,8 +34,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export CMonoids. -Require Export Nmonoid. +Require Export CoRN.algebra.CMonoids. +Require Export CoRN.model.monoids.Nmonoid. Section p71E1. diff --git a/model/monoids/Nm_to_freem.v b/model/monoids/Nm_to_freem.v index 41982dd5..6cc4cfd3 100644 --- a/model/monoids/Nm_to_freem.v +++ b/model/monoids/Nm_to_freem.v @@ -34,9 +34,9 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export CMonoids. -Require Export Nmonoid. -Require Export Nfinsetoid. +Require Export CoRN.algebra.CMonoids. +Require Export CoRN.model.monoids.Nmonoid. +Require Export CoRN.model.setoids.Nfinsetoid. Section p70text. diff --git a/model/monoids/Nmonoid.v b/model/monoids/Nmonoid.v index 87286a8e..c33f42b6 100644 --- a/model/monoids/Nmonoid.v +++ b/model/monoids/Nmonoid.v @@ -34,8 +34,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export Nsemigroup. -Require Import CMonoids. +Require Export CoRN.model.semigroups.Nsemigroup. +Require Import CoRN.algebra.CMonoids. (** ** Example of a monoid: $\langle$#⟨#[nat],[[+]]$\rangle$#⟩# diff --git a/model/monoids/Nposmonoid.v b/model/monoids/Nposmonoid.v index 37627400..1ce57b99 100644 --- a/model/monoids/Nposmonoid.v +++ b/model/monoids/Nposmonoid.v @@ -34,8 +34,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export Npossemigroup. -Require Import CMonoids. +Require Export CoRN.model.semigroups.Npossemigroup. +Require Import CoRN.algebra.CMonoids. (** ** Example of a monoid: $\langle$#⟨#[Npos],[[*]]$\rangle$#⟩# diff --git a/model/monoids/QSposmonoid.v b/model/monoids/QSposmonoid.v index 838f9695..27490f5e 100644 --- a/model/monoids/QSposmonoid.v +++ b/model/monoids/QSposmonoid.v @@ -35,8 +35,8 @@ *) -Require Export QSpossemigroup. -Require Import CMonoids. +Require Export CoRN.model.semigroups.QSpossemigroup. +Require Import CoRN.algebra.CMonoids. (** ** Example of a monoid: $\langle$#⟨#[Qpos],$(x,y) \mapsto xy/2$ #(x,y) ↦ xy/2#$\rangle$#⟩# diff --git a/model/monoids/Qmonoid.v b/model/monoids/Qmonoid.v index cd736951..38e59e8d 100644 --- a/model/monoids/Qmonoid.v +++ b/model/monoids/Qmonoid.v @@ -35,8 +35,8 @@ *) -Require Export Qsemigroup. -Require Import CMonoids. +Require Export CoRN.model.semigroups.Qsemigroup. +Require Import CoRN.algebra.CMonoids. Open Local Scope Q_scope. diff --git a/model/monoids/Qposmonoid.v b/model/monoids/Qposmonoid.v index aaa450ee..1a4d5e21 100644 --- a/model/monoids/Qposmonoid.v +++ b/model/monoids/Qposmonoid.v @@ -35,8 +35,8 @@ *) -Require Export Qpossemigroup. -Require Import CMonoids. +Require Export CoRN.model.semigroups.Qpossemigroup. +Require Import CoRN.algebra.CMonoids. (** ** Example of a monoid: $\langle$#⟨#[Qpos],[[*]]$\rangle$#⟩# diff --git a/model/monoids/Zmonoid.v b/model/monoids/Zmonoid.v index 5657bddd..a9d0a6ff 100644 --- a/model/monoids/Zmonoid.v +++ b/model/monoids/Zmonoid.v @@ -35,8 +35,8 @@ *) -Require Export Zsemigroup. -Require Export CMonoids. +Require Export CoRN.model.semigroups.Zsemigroup. +Require Export CoRN.algebra.CMonoids. (** ** Examples of monoids: $\langle$#⟨#[Z],[[+]]$\rangle$#⟩# and $\langle$#⟨#[Z],[[*]]$\rangle$#⟩# diff --git a/model/monoids/freem_to_Nm.v b/model/monoids/freem_to_Nm.v index 1bfd0103..5c02a4fe 100644 --- a/model/monoids/freem_to_Nm.v +++ b/model/monoids/freem_to_Nm.v @@ -34,8 +34,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export CMonoids. -Require Export Nmonoid. +Require Export CoRN.algebra.CMonoids. +Require Export CoRN.model.monoids.Nmonoid. Section p71E2. diff --git a/model/ordfields/CRordfield.v b/model/ordfields/CRordfield.v index 2bf4aba1..8cb374ec 100644 --- a/model/ordfields/CRordfield.v +++ b/model/ordfields/CRordfield.v @@ -19,11 +19,11 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Export CRFieldOps. -Require Export CRfield. -Require Export COrdFields. -Require Import CRcorrect. -Require Import CornTac. +Require Export CoRN.reals.fast.CRFieldOps. +Require Export CoRN.model.fields.CRfield. +Require Export CoRN.algebra.COrdFields. +Require Import CoRN.reals.fast.CRcorrect. +Require Import CoRN.tactics.CornTac. Open Local Scope uc_scope. diff --git a/model/ordfields/Qordfield.v b/model/ordfields/Qordfield.v index d4682d8b..2bc5df95 100644 --- a/model/ordfields/Qordfield.v +++ b/model/ordfields/Qordfield.v @@ -34,9 +34,9 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export Qfield. -Require Import COrdFields. -Require Import stdlib_omissions.Q. +Require Export CoRN.model.fields.Qfield. +Require Import CoRN.algebra.COrdFields. +Require Import CoRN.stdlib_omissions.Q. (** ** Example of an ordered field: $\langle$#⟨#[Q],[[+]],[[*]],[[<]]$\rangle$#⟩# [Q] is an archemaedian ordered field. diff --git a/model/partialorder/CRpartialorder.v b/model/partialorder/CRpartialorder.v index 2d60a25b..deeae9cd 100644 --- a/model/partialorder/CRpartialorder.v +++ b/model/partialorder/CRpartialorder.v @@ -19,8 +19,8 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Export CRGroupOps. -Require Import PartialOrder. +Require Export CoRN.reals.fast.CRGroupOps. +Require Import CoRN.order.PartialOrder. (** ** Example of a Partial Order: diff --git a/model/reals/CRreal.v b/model/reals/CRreal.v index c0e62851..4a7493af 100644 --- a/model/reals/CRreal.v +++ b/model/reals/CRreal.v @@ -19,12 +19,12 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Export CRFieldOps. -Require Export CRordfield. -Require Export CReals. -Require Import CRcorrect. -Require Import Qmetric. -Require Import CornTac. +Require Export CoRN.reals.fast.CRFieldOps. +Require Export CoRN.model.ordfields.CRordfield. +Require Export CoRN.reals.CReals. +Require Import CoRN.reals.fast.CRcorrect. +Require Import CoRN.model.metric2.Qmetric. +Require Import CoRN.tactics.CornTac. Opaque CR. diff --git a/model/reals/Cauchy_IR.v b/model/reals/Cauchy_IR.v index e8a3cd86..a15d909e 100644 --- a/model/reals/Cauchy_IR.v +++ b/model/reals/Cauchy_IR.v @@ -34,8 +34,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export Qordfield. -Require Export Cauchy_CReals. +Require Export CoRN.model.ordfields.Qordfield. +Require Export CoRN.reals.Cauchy_CReals. (** * Cauchy Real Numbers diff --git a/model/rings/CRring.v b/model/rings/CRring.v index 612b05a8..a89bc555 100644 --- a/model/rings/CRring.v +++ b/model/rings/CRring.v @@ -19,12 +19,12 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Export CRFieldOps. -Require Export CRabgroup. -Require Export CRings. -Require Import CRcorrect. -Require Import Rational. -Require Import CornTac. +Require Export CoRN.reals.fast.CRFieldOps. +Require Export CoRN.model.abgroups.CRabgroup. +Require Export CoRN.algebra.CRings. +Require Import CoRN.reals.fast.CRcorrect. +Require Import CoRN.tactics.Rational. +Require Import CoRN.tactics.CornTac. (** ** Example of a ring: $\langle$#⟨#[CR],[+],[*]$\rangle$#⟩# diff --git a/model/rings/Qring.v b/model/rings/Qring.v index d66a129e..c2bbeec7 100644 --- a/model/rings/Qring.v +++ b/model/rings/Qring.v @@ -34,9 +34,9 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export Qabgroup. -Require Import CRings. -Require Import Zring. +Require Export CoRN.model.abgroups.Qabgroup. +Require Import CoRN.algebra.CRings. +Require Import CoRN.model.rings.Zring. Open Local Scope Q_scope. diff --git a/model/rings/Zring.v b/model/rings/Zring.v index 01a4a148..a0a6c99a 100644 --- a/model/rings/Zring.v +++ b/model/rings/Zring.v @@ -34,8 +34,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export Zabgroup. -Require Import CRings. +Require Export CoRN.model.abgroups.Zabgroup. +Require Import CoRN.algebra.CRings. (** ** Example of a ring: $\langle$#⟨#[Z],[[+]],[[*]]$\rangle$#⟩# diff --git a/model/semigroups/CRsemigroup.v b/model/semigroups/CRsemigroup.v index b398639f..8a7d0056 100644 --- a/model/semigroups/CRsemigroup.v +++ b/model/semigroups/CRsemigroup.v @@ -19,11 +19,11 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Export CRGroupOps. -Require Export CRsetoid. -Require Export CGroups. -Require Import CRcorrect. -Require Import CornTac. +Require Export CoRN.reals.fast.CRGroupOps. +Require Export CoRN.model.setoids.CRsetoid. +Require Export CoRN.algebra.CGroups. +Require Import CoRN.reals.fast.CRcorrect. +Require Import CoRN.tactics.CornTac. (** ** Examples of semi-groups: $\langle$#⟨#[CR],[+]$\rangle$#⟩# diff --git a/model/semigroups/Npossemigroup.v b/model/semigroups/Npossemigroup.v index 3da6eb60..96bea6fe 100644 --- a/model/semigroups/Npossemigroup.v +++ b/model/semigroups/Npossemigroup.v @@ -34,9 +34,9 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export CSemiGroups. -Require Import Nsemigroup. -Require Export Npossetoid. +Require Export CoRN.algebra.CSemiGroups. +Require Import CoRN.model.semigroups.Nsemigroup. +Require Export CoRN.model.setoids.Npossetoid. (** ** Examples of semi-groups: $\langle$#⟨#[Npos],[[+]]$\rangle$#⟩# and $\langle$#⟨#[Npos],[[*]]$\rangle$#⟩# diff --git a/model/semigroups/Nsemigroup.v b/model/semigroups/Nsemigroup.v index c0d7fac2..2825eddf 100644 --- a/model/semigroups/Nsemigroup.v +++ b/model/semigroups/Nsemigroup.v @@ -34,8 +34,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export Nsetoid. -Require Import CSemiGroups. +Require Export CoRN.model.setoids.Nsetoid. +Require Import CoRN.algebra.CSemiGroups. (** ** Example of a semi-group: $\langle$#⟨#[nat],[[+]]$\rangle$#⟩# diff --git a/model/semigroups/QSpossemigroup.v b/model/semigroups/QSpossemigroup.v index a419da38..287096b1 100644 --- a/model/semigroups/QSpossemigroup.v +++ b/model/semigroups/QSpossemigroup.v @@ -34,8 +34,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export Qpossetoid. -Require Import CSemiGroups. +Require Export CoRN.model.setoids.Qpossetoid. +Require Import CoRN.algebra.CSemiGroups. (** ** Example of a semi-group: $\langle$#⟨#[Qpos],$(x,y) \mapsto xy/2$#(x,y) ↦ xy/2#$\rangle$#⟩# diff --git a/model/semigroups/Qpossemigroup.v b/model/semigroups/Qpossemigroup.v index d22ea80b..32d6a0ce 100644 --- a/model/semigroups/Qpossemigroup.v +++ b/model/semigroups/Qpossemigroup.v @@ -34,8 +34,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export Qpossetoid. -Require Export CSemiGroups. +Require Export CoRN.model.setoids.Qpossetoid. +Require Export CoRN.algebra.CSemiGroups. (** ** Example of a semi-group: $\langle$#⟨#[Qpos],[[*]]$\rangle$#⟩# diff --git a/model/semigroups/Qsemigroup.v b/model/semigroups/Qsemigroup.v index b5d6c590..db459552 100644 --- a/model/semigroups/Qsemigroup.v +++ b/model/semigroups/Qsemigroup.v @@ -34,8 +34,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export Qsetoid. -Require Import CSemiGroups. +Require Export CoRN.model.setoids.Qsetoid. +Require Import CoRN.algebra.CSemiGroups. (** ** Examples of semi-groups: $\langle$#⟨#[Q],[[+]]$\rangle$#⟩# and $\langle$#⟨#[Q],[[*]]$\rangle$#⟩# diff --git a/model/semigroups/Zsemigroup.v b/model/semigroups/Zsemigroup.v index 57bf81ba..d8426c69 100644 --- a/model/semigroups/Zsemigroup.v +++ b/model/semigroups/Zsemigroup.v @@ -34,8 +34,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export Zsetoid. -Require Export CSemiGroups. +Require Export CoRN.model.setoids.Zsetoid. +Require Export CoRN.algebra.CSemiGroups. (** ** Examples of semi-groups: $\langle$#⟨#[Z],[[+]]$\rangle$#⟩# and $\langle$#⟨#[Z],[[*]]$\rangle$#⟩# diff --git a/model/setoids/CRsetoid.v b/model/setoids/CRsetoid.v index b0e57d81..4448941d 100644 --- a/model/setoids/CRsetoid.v +++ b/model/setoids/CRsetoid.v @@ -19,10 +19,10 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Import CRcorrect. -Require Export CRmetric. -Require Export CSetoids. -Require Import CornTac. +Require Import CoRN.reals.fast.CRcorrect. +Require Export CoRN.model.metric2.CRmetric. +Require Export CoRN.algebra.CSetoids. +Require Import CoRN.tactics.CornTac. Instance CR_default : @DefaultRelation CR (@st_eq CR) | 2. diff --git a/model/setoids/Nfinsetoid.v b/model/setoids/Nfinsetoid.v index fc214f53..a9164a09 100644 --- a/model/setoids/Nfinsetoid.v +++ b/model/setoids/Nfinsetoid.v @@ -34,7 +34,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Import CSetoids. +Require Import CoRN.algebra.CSetoids. Set Automatic Introduction. (** diff --git a/model/setoids/Npossetoid.v b/model/setoids/Npossetoid.v index de3a0ea5..78fe2bf6 100644 --- a/model/setoids/Npossetoid.v +++ b/model/setoids/Npossetoid.v @@ -34,9 +34,9 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export Nsetoid. -Require Export Npossec. -Require Import CSetoidFun. +Require Export CoRN.model.setoids.Nsetoid. +Require Export CoRN.model.structures.Npossec. +Require Import CoRN.algebra.CSetoidFun. (** ** Example of a setoid: [Npos] diff --git a/model/setoids/Nsetoid.v b/model/setoids/Nsetoid.v index 830cbf5e..7dbfa27c 100644 --- a/model/setoids/Nsetoid.v +++ b/model/setoids/Nsetoid.v @@ -34,8 +34,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export Nsec. -Require Import CSetoidFun. +Require Export CoRN.model.structures.Nsec. +Require Import CoRN.algebra.CSetoidFun. Set Automatic Introduction. diff --git a/model/setoids/Qpossetoid.v b/model/setoids/Qpossetoid.v index 0f6aa8ee..92d07135 100644 --- a/model/setoids/Qpossetoid.v +++ b/model/setoids/Qpossetoid.v @@ -34,9 +34,9 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export Qsetoid. -Require Import CSetoidFun. -Require Export Qpossec. +Require Export CoRN.model.setoids.Qsetoid. +Require Import CoRN.algebra.CSetoidFun. +Require Export CoRN.model.structures.Qpossec. (** ** Example of a setoid: [Qpos] diff --git a/model/setoids/Qsetoid.v b/model/setoids/Qsetoid.v index 96c37236..4adf7749 100644 --- a/model/setoids/Qsetoid.v +++ b/model/setoids/Qsetoid.v @@ -35,8 +35,8 @@ *) -Require Export Qsec. -Require Import CSetoidFun. +Require Export CoRN.model.structures.Qsec. +Require Import CoRN.algebra.CSetoidFun. (** ** Example of a setoid: [Q] diff --git a/model/setoids/Zfinsetoid.v b/model/setoids/Zfinsetoid.v index cf75dd96..38f1bccb 100644 --- a/model/setoids/Zfinsetoid.v +++ b/model/setoids/Zfinsetoid.v @@ -33,8 +33,8 @@ * with this work; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export ZArith. -Require Import CSetoids. +Require Export Coq.ZArith.ZArith. +Require Import CoRN.algebra.CSetoids. Set Automatic Introduction. (** diff --git a/model/setoids/Zsetoid.v b/model/setoids/Zsetoid.v index ffb2aba6..dfeb8bd4 100644 --- a/model/setoids/Zsetoid.v +++ b/model/setoids/Zsetoid.v @@ -35,8 +35,8 @@ *) -Require Export Zsec. -Require Export CSetoidFun. +Require Export CoRN.model.structures.Zsec. +Require Export CoRN.algebra.CSetoidFun. (** ** Example of a setoid: [Z] diff --git a/model/setoids/decsetoid.v b/model/setoids/decsetoid.v index c629fb7f..7ff699fd 100644 --- a/model/setoids/decsetoid.v +++ b/model/setoids/decsetoid.v @@ -5,10 +5,10 @@ Set Implicit Arguments. Require Import - CSetoids - SetoidDec - Morphisms - SetoidClass. + CoRN.algebra.CSetoids + Coq.Classes.SetoidDec + Coq.Classes.Morphisms + Coq.Classes.SetoidClass. Set Automatic Introduction. diff --git a/model/structures/NNUpperR.v b/model/structures/NNUpperR.v index 6f32f84d..cdf58c67 100644 --- a/model/structures/NNUpperR.v +++ b/model/structures/NNUpperR.v @@ -1,9 +1,9 @@ (* This module is designed to *not* be Import'ed, only Require'd. *) Require Import - Qabs Qordfield Qpossec Coq.QArith.Qminmax Ring Program. + Coq.QArith.Qabs CoRN.model.ordfields.Qordfield CoRN.model.structures.Qpossec Coq.QArith.Qminmax Coq.setoid_ring.Ring Coq.Program.Program. -Require QnonNeg. +Require CoRN.model.structures.QnonNeg. Import QnonNeg.notations. Local Hint Resolve Qle_refl. diff --git a/model/structures/Npossec.v b/model/structures/Npossec.v index a6d46378..fc9e80cc 100644 --- a/model/structures/Npossec.v +++ b/model/structures/Npossec.v @@ -36,8 +36,8 @@ (** printing Npos $\mathbb{N}^{+}$ #N+# *) -Require Export Nsec. -Require Import Arith. +Require Export CoRN.model.structures.Nsec. +Require Import Coq.Arith.Arith. (** ** [Npos] diff --git a/model/structures/Nsec.v b/model/structures/Nsec.v index c1160723..81b89446 100644 --- a/model/structures/Nsec.v +++ b/model/structures/Nsec.v @@ -36,9 +36,9 @@ (** printing {#N} $\ensuremath{\mathrel\#_{\mathbb N}}$ *) -Require Export Peano_dec. -Require Export Relations. -Require Import CLogic. +Require Export Coq.Arith.Peano_dec. +Require Export Coq.Relations.Relations. +Require Import CoRN.logic.CLogic. (** * [nat] diff --git a/model/structures/OpenUnit.v b/model/structures/OpenUnit.v index e284bf4d..bc32c141 100644 --- a/model/structures/OpenUnit.v +++ b/model/structures/OpenUnit.v @@ -18,11 +18,11 @@ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Export QArith. -Require Import Qordfield. -Require Import COrdFields. -Require Import Qauto. -Require Import CornTac. +Require Export Coq.QArith.QArith. +Require Import CoRN.model.ordfields.Qordfield. +Require Import CoRN.algebra.COrdFields. +Require Import CoRN.tactics.Qauto. +Require Import CoRN.tactics.CornTac. Set Implicit Arguments. diff --git a/model/structures/Qinf.v b/model/structures/Qinf.v index 99800ff7..88331182 100644 --- a/model/structures/Qinf.v +++ b/model/structures/Qinf.v @@ -1,9 +1,9 @@ Require Import - Setoid Arith - Qring QposInf - stdlib_omissions.Q - interfaces.abstract_algebra - stdlib_rationals + Coq.Setoids.Setoid Coq.Arith.Arith + CoRN.model.rings.Qring CoRN.model.structures.QposInf + CoRN.stdlib_omissions.Q + MathClasses.interfaces.abstract_algebra + MathClasses.implementations.stdlib_rationals MathClasses.theory.setoids. Inductive T: Set := finite (q: Q) | infinite. diff --git a/model/structures/QnnInf.v b/model/structures/QnnInf.v index c55c7ff0..a21e491c 100644 --- a/model/structures/QnnInf.v +++ b/model/structures/QnnInf.v @@ -1,8 +1,8 @@ -Require QnonNeg. +Require CoRN.model.structures.QnonNeg. Import QnonNeg.notations. -Require Import QposInf. +Require Import CoRN.model.structures.QposInf. Inductive T: Set := Infinite | Finite (q: QnonNeg). diff --git a/model/structures/QnonNeg.v b/model/structures/QnonNeg.v index 58eb3c34..893bbd0b 100644 --- a/model/structures/QnonNeg.v +++ b/model/structures/QnonNeg.v @@ -1,6 +1,6 @@ (* This module is designed to *not* be Import'ed, only Require'd. *) -Require Import Program Qpossec QposInf Coq.QArith.Qminmax. +Require Import Coq.Program.Program CoRN.model.structures.Qpossec CoRN.model.structures.QposInf Coq.QArith.Qminmax. Set Automatic Introduction. diff --git a/model/structures/QposInf.v b/model/structures/QposInf.v index b5be3c6d..29f9f2a3 100644 --- a/model/structures/QposInf.v +++ b/model/structures/QposInf.v @@ -19,9 +19,9 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Export QArith. -Require Export Qpossec. -Require Import QposMinMax. +Require Export Coq.QArith.QArith. +Require Export CoRN.model.structures.Qpossec. +Require Import CoRN.model.totalorder.QposMinMax. (** printing QposInf $\mathbb{Q}^{+}_{\infty}$ #Q+# *) (** printing QposInfinity $\infty$ #∞# *) diff --git a/model/structures/Qpossec.v b/model/structures/Qpossec.v index e4e578a8..bb18ab66 100644 --- a/model/structures/Qpossec.v +++ b/model/structures/Qpossec.v @@ -36,15 +36,15 @@ (** printing Qpos $\mathbb{Q}^{+}$ #Q+# *) -Require Export QArith. -Require Import Qpower. -Require Import Qordfield. -Require Import COrdFields2. -Require Import Eqdep_dec. -Require Import CornTac. -Require Import Qround. -Require Import Qabs. -Require Import stdlib_omissions.Q. +Require Export Coq.QArith.QArith. +Require Import Coq.QArith.Qpower. +Require Import CoRN.model.ordfields.Qordfield. +Require Import CoRN.algebra.COrdFields2. +Require Import Coq.Logic.Eqdep_dec. +Require Import CoRN.tactics.CornTac. +Require Import Coq.QArith.Qround. +Require Import Coq.QArith.Qabs. +Require Import CoRN.stdlib_omissions.Q. Open Local Scope Q_scope. @@ -129,7 +129,7 @@ Lemma positive_Z (z: Z): Zlt 0 z -> sig (fun p: positive => Zpos p = z). auto with *. Defined. -Require Eqdep_dec. (* todo: move this Qlt_uniq stuff elsewhere *) +Require Coq.Logic.Eqdep_dec. (* todo: move this Qlt_uniq stuff elsewhere *) Definition comparison_eq_dec (a b: comparison): { a = b } + { a <> b}. destruct a, b; try (left; reflexivity); try (right; discriminate). diff --git a/model/structures/Qsec.v b/model/structures/Qsec.v index 9e1e929d..cdb99225 100644 --- a/model/structures/Qsec.v +++ b/model/structures/Qsec.v @@ -40,12 +40,12 @@ (** printing QTWO %\ensuremath{2_\mathbb{Q}}% #2Q# *) (** printing QFOUR %\ensuremath{4_\mathbb{Q}}% #4Q# *) -Require Export CLogic. -Require Import Arith. -Require Import Peano_dec. -Require Import Zsec. -Require Export QArith. -Require Import stdlib_omissions.Q. +Require Export CoRN.logic.CLogic. +Require Import Coq.Arith.Arith. +Require Import Coq.Arith.Peano_dec. +Require Import CoRN.model.structures.Zsec. +Require Export Coq.QArith.QArith. +Require Import CoRN.stdlib_omissions.Q. Close Scope Q_scope. Open Local Scope Q_scope. diff --git a/model/structures/StepQsec.v b/model/structures/StepQsec.v index 2c9f9ab8..c69857f6 100644 --- a/model/structures/StepQsec.v +++ b/model/structures/StepQsec.v @@ -1,11 +1,11 @@ -Require Import Qmetric. -Require Export QArith. -Require Export StepFunctionSetoid. -Require Import Qabs. +Require Import CoRN.model.metric2.Qmetric. +Require Export Coq.QArith.QArith. +Require Export CoRN.metric2.StepFunctionSetoid. +Require Import Coq.QArith.Qabs. Require Import Coq.Bool.Bool. -Require Import CornTac. -Require Import CornBasics. -Require Import RSetoid. +Require Import CoRN.tactics.CornTac. +Require Import CoRN.logic.CornBasics. +Require Import CoRN.algebra.RSetoid. Set Implicit Arguments. diff --git a/model/structures/Zsec.v b/model/structures/Zsec.v index e1534115..0665a44d 100644 --- a/model/structures/Zsec.v +++ b/model/structures/Zsec.v @@ -36,9 +36,9 @@ (** printing {#Z} %\ensuremath{\mathrel\#_{\mathbb Z}}% *) -Require Export ZArith. -Require Import CLogic. -Require Import Setoid. +Require Export Coq.ZArith.ZArith. +Require Import CoRN.logic.CLogic. +Require Import Coq.Setoids.Setoid. Instance Z_default : @DefaultRelation Z (@eq Z) | 2. diff --git a/model/totalorder/QMinMax.v b/model/totalorder/QMinMax.v index 021c1359..6f1d738d 100644 --- a/model/totalorder/QMinMax.v +++ b/model/totalorder/QMinMax.v @@ -19,8 +19,8 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Import QArith_base. -Require Import TotalOrder. +Require Import Coq.QArith.QArith_base. +Require Import CoRN.order.TotalOrder. Set Automatic Introduction. (** diff --git a/model/totalorder/QposMinMax.v b/model/totalorder/QposMinMax.v index f0d1b873..4beb3bba 100644 --- a/model/totalorder/QposMinMax.v +++ b/model/totalorder/QposMinMax.v @@ -19,10 +19,10 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Import Qpossec. -Require Import QArith. -Require Import QMinMax. -Require Import TotalOrder. +Require Import CoRN.model.structures.Qpossec. +Require Import Coq.QArith.QArith. +Require Import CoRN.model.totalorder.QMinMax. +Require Import CoRN.order.TotalOrder. (** ** Example of a Total Order: diff --git a/model/totalorder/ZMinMax.v b/model/totalorder/ZMinMax.v index 5bef04ec..dc6590a3 100644 --- a/model/totalorder/ZMinMax.v +++ b/model/totalorder/ZMinMax.v @@ -19,10 +19,10 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Export Zmin. -Require Export Zmax. -Require Import ZArith. -Require Import TotalOrder. +Require Export Coq.ZArith.Zmin. +Require Export Coq.ZArith.Zmax. +Require Import Coq.ZArith.ZArith. +Require Import CoRN.order.TotalOrder. Opaque Z_lt_le_dec. (** diff --git a/ode/AbstractIntegration.v b/ode/AbstractIntegration.v index cd4b9c41..a599d352 100644 --- a/ode/AbstractIntegration.v +++ b/ode/AbstractIntegration.v @@ -2,19 +2,19 @@ with a proof that integrals satisfying this interface are unique. *) Require Import - Unicode.Utf8 Program - CRArith CRabs - Qauto Qround Qmetric - stdlib_omissions.P - stdlib_omissions.Z - stdlib_omissions.Q - stdlib_omissions.N. -Require Import metric FromMetric2 SimpleIntegration. - -Require Qinf QnonNeg QnnInf CRball. + Coq.Unicode.Utf8 Coq.Program.Program + CoRN.reals.fast.CRArith CoRN.reals.fast.CRabs + CoRN.tactics.Qauto Coq.QArith.Qround CoRN.model.metric2.Qmetric + CoRN.stdlib_omissions.P + CoRN.stdlib_omissions.Z + CoRN.stdlib_omissions.Q + CoRN.stdlib_omissions.N. +Require Import CoRN.ode.metric CoRN.ode.FromMetric2 CoRN.ode.SimpleIntegration. + +Require CoRN.model.structures.Qinf CoRN.model.structures.QnonNeg CoRN.model.structures.QnnInf CoRN.reals.fast.CRball. Import Qinf.notations QnonNeg.notations QnnInf.notations CRball.notations Qabs (*canonical_names*). -Require CRtrans ARtrans. (* This is almost all CoRN *) +Require CoRN.reals.fast.CRtrans CoRN.reals.faster.ARtrans. (* This is almost all CoRN *) Ltac done := trivial; hnf; intros; solve @@ -693,7 +693,7 @@ Context (f : Q -> CR) `{Integrable f}. Lemma scale_0_r (x : Q) : scale x 0 = 0. Proof. rewrite <- CRmult_scale; change (cast Q CR x * 0 = 0); ring. Qed. -Require Import propholds. +Require Import MathClasses.misc.propholds. Lemma integral_abs_bound (from : Q) (width : QnonNeg) (M : Q) : (forall (x : Q), (from ≤ x ≤ from + width) -> CRabs (f x) ≤ 'M) -> diff --git a/ode/BanachFixpoint.v b/ode/BanachFixpoint.v index 0603126e..5fd90e52 100644 --- a/ode/BanachFixpoint.v +++ b/ode/BanachFixpoint.v @@ -1,14 +1,14 @@ Require Import - QArith - stdlib_rationals Qinf Qpossec QposInf QnonNeg abstract_algebra QType_rationals additional_operations. -Require Import Qauto QOrderedType. -Require Import theory.rings theory.dec_fields orders.rings orders.dec_fields nat_pow. -Require Import interfaces.naturals interfaces.orders. + Coq.QArith.QArith + MathClasses.implementations.stdlib_rationals CoRN.model.structures.Qinf CoRN.model.structures.Qpossec CoRN.model.structures.QposInf CoRN.model.structures.QnonNeg MathClasses.interfaces.abstract_algebra MathClasses.implementations.QType_rationals MathClasses.interfaces.additional_operations. +Require Import CoRN.tactics.Qauto Coq.QArith.QOrderedType. +Require Import MathClasses.theory.rings MathClasses.theory.dec_fields MathClasses.orders.rings MathClasses.orders.dec_fields MathClasses.theory.nat_pow. +Require Import MathClasses.interfaces.naturals MathClasses.interfaces.orders. Import peano_naturals. -Require Import CRGeometricSum. +Require Import CoRN.reals.fast.CRGeometricSum. Import Qround Qpower. -Require Import metric. +Require Import CoRN.ode.metric. Local Notation ball := mspc_ball. Local Notation "x ²" := (x * x) (at level 30) : mc_scope. diff --git a/ode/FromMetric2.v b/ode/FromMetric2.v index f098bba8..5ce14109 100644 --- a/ode/FromMetric2.v +++ b/ode/FromMetric2.v @@ -1,8 +1,8 @@ -Require Import metric2.Complete metric2.Metric metric. +Require Import CoRN.metric2.Complete CoRN.metric2.Metric CoRN.ode.metric. Require Import - abstract_algebra stdlib_rationals - orders.orders orders.semirings orders.rings theory.rings. + MathClasses.interfaces.abstract_algebra MathClasses.implementations.stdlib_rationals + MathClasses.orders.orders MathClasses.orders.semirings MathClasses.orders.rings MathClasses.theory.rings. Import Qinf.notations. @@ -87,7 +87,7 @@ Qed. End FromCompleteMetricSpace. -Require Import CRmetric. +Require Import CoRN.model.metric2.CRmetric. Section CompleteSegment. @@ -122,7 +122,7 @@ Qed. End CompleteSegment. -Require Import Qsetoid Qmetric CRArith CRball CRabs abs minmax. +Require Import CoRN.model.setoids.Qsetoid CoRN.model.metric2.Qmetric CoRN.reals.fast.CRArith CoRN.reals.fast.CRball CoRN.reals.fast.CRabs MathClasses.theory.abs MathClasses.orders.minmax. Add Ring CR : (stdlib_ring_theory CR). diff --git a/ode/Picard.v b/ode/Picard.v index 101c1917..17e8a958 100644 --- a/ode/Picard.v +++ b/ode/Picard.v @@ -1,19 +1,19 @@ Require Import - Unicode.Utf8 Program - CRArith CRabs - Qauto Qround Qmetric + Coq.Unicode.Utf8 Coq.Program.Program + CoRN.reals.fast.CRArith CoRN.reals.fast.CRabs + CoRN.tactics.Qauto Coq.QArith.Qround CoRN.model.metric2.Qmetric (*stdlib_omissions.P stdlib_omissions.Z stdlib_omissions.Q stdlib_omissions.N*). -Require Qinf QnonNeg QnnInf CRball. +Require CoRN.model.structures.Qinf CoRN.model.structures.QnonNeg CoRN.model.structures.QnnInf CoRN.reals.fast.CRball. Import QnonNeg Qinf.notations QnonNeg.notations QnnInf.notations CRball.notations Qabs propholds. -Require Import metric FromMetric2 AbstractIntegration SimpleIntegration BanachFixpoint. -Require Import canonical_names decision setoid_tactics util. +Require Import CoRN.ode.metric CoRN.ode.FromMetric2 CoRN.ode.AbstractIntegration CoRN.ode.SimpleIntegration CoRN.ode.BanachFixpoint. +Require Import MathClasses.interfaces.canonical_names MathClasses.misc.decision MathClasses.misc.setoid_tactics MathClasses.misc.util. Close Scope uc_scope. (* There is a leak in some module *) Open Scope signature_scope. (* To interpret "==>" *) diff --git a/ode/SimpleIntegration.v b/ode/SimpleIntegration.v index 76a5e751..f10f952e 100644 --- a/ode/SimpleIntegration.v +++ b/ode/SimpleIntegration.v @@ -7,19 +7,19 @@ makes it relatively generic, but it also means that it is fairly inefficient. *) Require Import - List NPeano Unicode.Utf8 - QArith Qabs Qpossec QnonNeg Qsums - Qmetric Qsetoid (* Needs imported for Q_is_Setoid to be a canonical structure *) - CRArith (*AbstractIntegration*) - util.Qgcd - Program - uneven_CRplus - stdlib_omissions.P - stdlib_omissions.Z - stdlib_omissions.Q - Qauto - metric FromMetric2 - implementations.stdlib_rationals. + CoRN.stdlib_omissions.List Coq.Numbers.Natural.Peano.NPeano Coq.Unicode.Utf8 + Coq.QArith.QArith Coq.QArith.Qabs CoRN.model.structures.Qpossec CoRN.model.structures.QnonNeg CoRN.util.Qsums + CoRN.model.metric2.Qmetric CoRN.model.setoids.Qsetoid (* Needs imported for Q_is_Setoid to be a canonical structure *) + CoRN.reals.fast.CRArith (*AbstractIntegration*) + CoRN.util.Qgcd + Coq.Program.Program + CoRN.reals.fast.uneven_CRplus + CoRN.stdlib_omissions.P + CoRN.stdlib_omissions.Z + CoRN.stdlib_omissions.Q + CoRN.tactics.Qauto + CoRN.ode.metric CoRN.ode.FromMetric2 + MathClasses.implementations.stdlib_rationals. Import QnonNeg.notations. diff --git a/ode/metric.v b/ode/metric.v index ba5903b2..a4039d41 100644 --- a/ode/metric.v +++ b/ode/metric.v @@ -1,16 +1,16 @@ Require Import - QArith - theory.setoids (* Equiv Prop *) theory.products - stdlib_rationals (*Qinf*) (*Qpossec QposInf QnonNeg*) abstract_algebra QType_rationals additional_operations. -Require Qinf. + Coq.QArith.QArith + MathClasses.theory.setoids (* Equiv Prop *) MathClasses.theory.products + MathClasses.implementations.stdlib_rationals (*Qinf*) (*Qpossec QposInf QnonNeg*) MathClasses.interfaces.abstract_algebra MathClasses.implementations.QType_rationals MathClasses.interfaces.additional_operations. +Require CoRN.model.structures.Qinf. (*Import (*QnonNeg.notations*) QArith.*) -Require Import Qauto QOrderedType. +Require Import CoRN.tactics.Qauto Coq.QArith.QOrderedType. (*Require Import orders.*) -Require Import theory.rings theory.dec_fields orders.rings orders.dec_fields nat_pow. -Require Import interfaces.naturals interfaces.orders. +Require Import MathClasses.theory.rings MathClasses.theory.dec_fields MathClasses.orders.rings MathClasses.orders.dec_fields MathClasses.theory.nat_pow. +Require Import MathClasses.interfaces.naturals MathClasses.interfaces.orders. Import peano_naturals. -Require Import CRGeometricSum. +Require Import CoRN.reals.fast.CRGeometricSum. Import Qround Qpower Qinf.notations. (* Set Printing Coercions.*) diff --git a/order/Lattice.v b/order/Lattice.v index 38bc7a69..f0010206 100644 --- a/order/Lattice.v +++ b/order/Lattice.v @@ -19,8 +19,8 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Import Setoid. -Require Export SemiLattice. +Require Import Coq.Setoids.Setoid. +Require Export CoRN.order.SemiLattice. Open Local Scope po_scope. diff --git a/order/PartialOrder.v b/order/PartialOrder.v index 24c8a9de..72528e43 100644 --- a/order/PartialOrder.v +++ b/order/PartialOrder.v @@ -20,7 +20,7 @@ CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) Set Firstorder Depth 5. -Require Export RSetoid. +Require Export CoRN.algebra.RSetoid. Set Implicit Arguments. diff --git a/order/SemiLattice.v b/order/SemiLattice.v index 536a8a9b..befb03e2 100644 --- a/order/SemiLattice.v +++ b/order/SemiLattice.v @@ -20,7 +20,7 @@ CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) Set Firstorder Depth 5. -Require Export PartialOrder. +Require Export CoRN.order.PartialOrder. Open Local Scope po_scope. diff --git a/order/TotalOrder.v b/order/TotalOrder.v index 282e75eb..df215f07 100644 --- a/order/TotalOrder.v +++ b/order/TotalOrder.v @@ -20,8 +20,8 @@ CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) Set Firstorder Depth 5. -Require Import Setoid. -Require Export Lattice. +Require Import Coq.Setoids.Setoid. +Require Export CoRN.order.Lattice. Open Local Scope po_scope. (** diff --git a/raster/Raster.v b/raster/Raster.v index 096986e4..cfbbaf03 100644 --- a/raster/Raster.v +++ b/raster/Raster.v @@ -1,7 +1,7 @@ -Require Vector. +Require Coq.Vectors.Vector. Export Vector.VectorNotations. -Require Export List. -Require Import Arith. +Require Export CoRN.stdlib_omissions.List. +Require Import Coq.Arith.Arith. Set Implicit Arguments. diff --git a/reals/Bridges_LUB.v b/reals/Bridges_LUB.v index c4e2a5d3..26bca15f 100644 --- a/reals/Bridges_LUB.v +++ b/reals/Bridges_LUB.v @@ -44,8 +44,8 @@ -Require Export iso_CReals. -Require Import Expon. +Require Export CoRN.reals.iso_CReals. +Require Import CoRN.algebra.Expon. Section LUBP. diff --git a/reals/Bridges_iso.v b/reals/Bridges_iso.v index fb617fa3..28a945d8 100644 --- a/reals/Bridges_iso.v +++ b/reals/Bridges_iso.v @@ -43,7 +43,7 @@ (* description : Bridges' proof of Cauchy completeness in TCS-219 *) -Require Import Bridges_LUB. +Require Import CoRN.reals.Bridges_LUB. (* This lemma comes from lemmas.v of Martijn Oostdijk *) diff --git a/reals/CMetricFields.v b/reals/CMetricFields.v index d8b15a78..80d25fa5 100644 --- a/reals/CMetricFields.v +++ b/reals/CMetricFields.v @@ -34,7 +34,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export CReals1. +Require Export CoRN.reals.CReals1. Section CMetric_Fields. diff --git a/reals/CPoly_Contin.v b/reals/CPoly_Contin.v index 54bbed46..26ff91b5 100644 --- a/reals/CPoly_Contin.v +++ b/reals/CPoly_Contin.v @@ -37,7 +37,7 @@ (** * Continuity of polynomials *) -Require Export RealFuncts. +Require Export CoRN.reals.RealFuncts. Lemma plus_op_contin : forall f g h : CSetoid_un_op IR, contin f -> contin g -> (forall x, f x[+]g x [=] h x) -> contin h. diff --git a/reals/CReals.v b/reals/CReals.v index 6805573d..bb664777 100644 --- a/reals/CReals.v +++ b/reals/CReals.v @@ -36,7 +36,7 @@ (** printing Lim %\ensuremath{\lim}% *) -Require Export COrdCauchy. +Require Export CoRN.algebra.COrdCauchy. (** * Definition of the notion of reals diff --git a/reals/CReals1.v b/reals/CReals1.v index ba761997..0e67adaf 100644 --- a/reals/CReals1.v +++ b/reals/CReals1.v @@ -34,9 +34,9 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export Max_AbsIR. -Require Export Expon. -Require Export CPoly_ApZero. +Require Export CoRN.reals.Max_AbsIR. +Require Export CoRN.algebra.Expon. +Require Export CoRN.algebra.CPoly_ApZero. Section More_Cauchy_Props. diff --git a/reals/CSumsReals.v b/reals/CSumsReals.v index e7dfb4fd..f3afec28 100644 --- a/reals/CSumsReals.v +++ b/reals/CSumsReals.v @@ -34,7 +34,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export CReals1. +Require Export CoRN.reals.CReals1. (** * Sums over Reals diff --git a/reals/CauchySeq.v b/reals/CauchySeq.v index 3f7f8b96..163b0d13 100644 --- a/reals/CauchySeq.v +++ b/reals/CauchySeq.v @@ -40,8 +40,8 @@ (** printing OneR %\ensuremath{\mathbf1}% #1# *) (** printing AbsIR %\ensuremath{|\cdot|_{\mathbb R}}% *) -Require Export CReals. -Require Cauchy_IR. +Require Export CoRN.reals.CReals. +Require CoRN.model.reals.Cauchy_IR. (** * Real Number Structures diff --git a/reals/Cauchy_CReals.v b/reals/Cauchy_CReals.v index cb4c0ea3..b7d533e7 100644 --- a/reals/Cauchy_CReals.v +++ b/reals/Cauchy_CReals.v @@ -34,8 +34,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export Cauchy_COF. -Require Export CReals. +Require Export CoRN.algebra.Cauchy_COF. +Require Export CoRN.reals.CReals. Section R_CReals. diff --git a/reals/Cesaro.v b/reals/Cesaro.v index 6fa70c52..115320ad 100644 --- a/reals/Cesaro.v +++ b/reals/Cesaro.v @@ -33,8 +33,8 @@ * with this work; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export Series. -Require Export PosSeq. +Require Export CoRN.reals.Series. +Require Export CoRN.reals.PosSeq. Section AlgebraBits. diff --git a/reals/IVT.v b/reals/IVT.v index 85433426..d6b59d52 100644 --- a/reals/IVT.v +++ b/reals/IVT.v @@ -34,7 +34,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export CPoly_Contin. +Require Export CoRN.reals.CPoly_Contin. Section Nested_Intervals. (** diff --git a/reals/Intervals.v b/reals/Intervals.v index 9ec3c669..8e6161e4 100644 --- a/reals/Intervals.v +++ b/reals/Intervals.v @@ -34,8 +34,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export CSetoidInc. -Require Export RealLists. +Require Export CoRN.algebra.CSetoidInc. +Require Export CoRN.reals.RealLists. Set Automatic Introduction. Section Intervals. diff --git a/reals/Max_AbsIR.v b/reals/Max_AbsIR.v index fdd39fb4..3fef4b3b 100644 --- a/reals/Max_AbsIR.v +++ b/reals/Max_AbsIR.v @@ -37,9 +37,9 @@ (** printing Max %\ensuremath{\max}% *) (** printing Min %\ensuremath{\min}% *) -Require Export Q_in_CReals. -Require Import Qabs. -Require Export CauchySeq. +Require Export CoRN.reals.Q_in_CReals. +Require Import Coq.QArith.Qabs. +Require Export CoRN.reals.CauchySeq. Section Maximum. diff --git a/reals/NRootIR.v b/reals/NRootIR.v index 0478d368..3846e3f7 100644 --- a/reals/NRootIR.v +++ b/reals/NRootIR.v @@ -37,7 +37,7 @@ (** printing NRoot %\ensuremath{\sqrt[n]{\cdot}}% *) (** printing sqrt %\ensuremath{\sqrt{\cdot}}% *) -Require Export OddPolyRootIR. +Require Export CoRN.reals.OddPolyRootIR. (** * Roots of Real Numbers *) diff --git a/reals/OddPolyRootIR.v b/reals/OddPolyRootIR.v index be4f4a08..95f04e87 100644 --- a/reals/OddPolyRootIR.v +++ b/reals/OddPolyRootIR.v @@ -34,7 +34,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export IVT. +Require Export CoRN.reals.IVT. (** * Roots of polynomials of odd degree *) diff --git a/reals/PosSeq.v b/reals/PosSeq.v index 2ade4b65..219df8c4 100644 --- a/reals/PosSeq.v +++ b/reals/PosSeq.v @@ -33,7 +33,7 @@ * with this work; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export Series. +Require Export CoRN.reals.Series. Section SeqProperties. diff --git a/reals/Q_dense.v b/reals/Q_dense.v index 17367a2c..679a9bbc 100644 --- a/reals/Q_dense.v +++ b/reals/Q_dense.v @@ -34,7 +34,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) (* begin hide *) -Require Export Q_in_CReals. +Require Export CoRN.reals.Q_in_CReals. (*----- Opaque_algebra.v will be loaded in line 151 -----*) diff --git a/reals/Q_in_CReals.v b/reals/Q_in_CReals.v index afbb2fa5..43cc0999 100644 --- a/reals/Q_in_CReals.v +++ b/reals/Q_in_CReals.v @@ -43,13 +43,13 @@ rational numbers for which the real number lies betwen image of them; in other words we will prove that the image of rational numbers in dense in any real number structure. *) -Require Export Cauchy_IR. -Require Export Nmonoid. -Require Export Zring. -Require Import CRing_Homomorphisms. -Require Import Expon. -Require Import Qpower. -Require Import CornTac. +Require Export CoRN.model.reals.Cauchy_IR. +Require Export CoRN.model.monoids.Nmonoid. +Require Export CoRN.model.rings.Zring. +Require Import CoRN.algebra.CRing_Homomorphisms. +Require Import CoRN.algebra.Expon. +Require Import Coq.QArith.Qpower. +Require Import CoRN.tactics.CornTac. Section Rational_sequence_prelogue. diff --git a/reals/R_morphism.v b/reals/R_morphism.v index 19f60b54..ff43c1d7 100644 --- a/reals/R_morphism.v +++ b/reals/R_morphism.v @@ -38,7 +38,7 @@ structures, is introduced together with te proofs that this notion of morphism preserves the basic algebraic structure. *) -Require Import CReals. +Require Import CoRN.reals.CReals. (* This comes from CReals1.v *) Definition Cauchy_Lim_prop2 (IR : CReals) (seq : nat -> IR) diff --git a/reals/RealCount.v b/reals/RealCount.v index cac39a02..08105fe7 100644 --- a/reals/RealCount.v +++ b/reals/RealCount.v @@ -33,7 +33,7 @@ * with this work; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export CReals1. +Require Export CoRN.reals.CReals1. Set Automatic Introduction. (* Consider Reals are enumerated by function f *) diff --git a/reals/RealFuncts.v b/reals/RealFuncts.v index ec30c236..a8ce72ca 100644 --- a/reals/RealFuncts.v +++ b/reals/RealFuncts.v @@ -34,7 +34,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export CReals1. +Require Export CoRN.reals.CReals1. (** * Continuity of Functions on Reals diff --git a/reals/RealLists.v b/reals/RealLists.v index e47e6a91..d3688814 100644 --- a/reals/RealLists.v +++ b/reals/RealLists.v @@ -34,7 +34,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export CReals1. +Require Export CoRN.reals.CReals1. Section Lists. diff --git a/reals/Series.v b/reals/Series.v index e812ed86..c6f99cba 100644 --- a/reals/Series.v +++ b/reals/Series.v @@ -38,8 +38,8 @@ (** printing series_sum %\ensuremath{\sum_0^{\infty}}% #∑0# *) (** printing pi %\ensuremath{\pi}% #π *) -Require Export CSumsReals. -Require Export NRootIR. +Require Export CoRN.reals.CSumsReals. +Require Export CoRN.reals.NRootIR. Section Definitions. diff --git a/reals/fast/CRAlternatingSum.v b/reals/fast/CRAlternatingSum.v index 79c6863c..b79604cc 100644 --- a/reals/fast/CRAlternatingSum.v +++ b/reals/fast/CRAlternatingSum.v @@ -19,24 +19,24 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Import iso_CReals. -Require Import Q_in_CReals. -Require Import ArithRing. -Require Export CRArith. -Require Import CRIR. +Require Import CoRN.reals.iso_CReals. +Require Import CoRN.reals.Q_in_CReals. +Require Import Coq.setoid_ring.ArithRing. +Require Export CoRN.reals.fast.CRArith. +Require Import CoRN.reals.fast.CRIR. Require Import Coq.Bool.Bool. -Require Import COrdAbs. -Require Import Qordfield. -Require Export Qmetric. -Require Import LazyNat. -Require Export Limit. -Require Import QposMinMax. -Require Import Qpower. +Require Import CoRN.algebra.COrdAbs. +Require Import CoRN.model.ordfields.Qordfield. +Require Export CoRN.model.metric2.Qmetric. +Require Import CoRN.reals.fast.LazyNat. +Require Export CoRN.metric2.Limit. +Require Import CoRN.model.totalorder.QposMinMax. +Require Import Coq.QArith.Qpower. Require Export Coq.Lists.Streams. -Require Import PowerSeries. -Require Import CornTac. -Require Import Qclasses. -Require Import abstract_algebra interfaces.orders theory.series theory.streams. +Require Import CoRN.transc.PowerSeries. +Require Import CoRN.tactics.CornTac. +Require Import CoRN.classes.Qclasses. +Require Import MathClasses.interfaces.abstract_algebra MathClasses.interfaces.orders MathClasses.theory.series MathClasses.theory.streams. Opaque CR. diff --git a/reals/fast/CRArith.v b/reals/fast/CRArith.v index 7be1fb9a..f1609dab 100644 --- a/reals/fast/CRArith.v +++ b/reals/fast/CRArith.v @@ -19,23 +19,23 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Import Ring_theory. -Require Import Setoid. -Require Import QArith. -Require Import Qabs. -Require Import Qround. -Require Export CRreal. -Require Import Complete. -Require Export CRFieldOps. -Require Import Qring. -Require Import CRing_Homomorphisms. -Require Import Qmetric. -Require Import CornTac. -Require Import Stability. -Require Import ConstructiveEpsilon. -Require Import Qdlog. -Require Import abstract_algebra. -Require Import interfaces.orders. +Require Import Coq.setoid_ring.Ring_theory. +Require Import Coq.Setoids.Setoid. +Require Import Coq.QArith.QArith. +Require Import Coq.QArith.Qabs. +Require Import Coq.QArith.Qround. +Require Export CoRN.model.reals.CRreal. +Require Import CoRN.metric2.Complete. +Require Export CoRN.reals.fast.CRFieldOps. +Require Import CoRN.model.rings.Qring. +Require Import CoRN.algebra.CRing_Homomorphisms. +Require Import CoRN.model.metric2.Qmetric. +Require Import CoRN.tactics.CornTac. +Require Import CoRN.logic.Stability. +Require Import Coq.Logic.ConstructiveEpsilon. +Require Import CoRN.util.Qdlog. +Require Import MathClasses.interfaces.abstract_algebra. +Require Import MathClasses.interfaces.orders. Open Local Scope CR_scope. diff --git a/reals/fast/CRFieldOps.v b/reals/fast/CRFieldOps.v index 021ef908..3c2f0360 100644 --- a/reals/fast/CRFieldOps.v +++ b/reals/fast/CRFieldOps.v @@ -19,15 +19,15 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Import CLogic. -Require Export CRlattice. -Require Import QMinMax. -Require Import Qabs. -Require Import COrdAbs. -Require Import Qordfield. -Require Import Qmetric. -Require Import CornTac. -Require Import canonical_names. +Require Import CoRN.logic.CLogic. +Require Export CoRN.model.lattice.CRlattice. +Require Import CoRN.model.totalorder.QMinMax. +Require Import Coq.QArith.Qabs. +Require Import CoRN.algebra.COrdAbs. +Require Import CoRN.model.ordfields.Qordfield. +Require Import CoRN.model.metric2.Qmetric. +Require Import CoRN.tactics.CornTac. +Require Import MathClasses.interfaces.canonical_names. Set Implicit Arguments. diff --git a/reals/fast/CRGeometricSum.v b/reals/fast/CRGeometricSum.v index 6e18ad1d..7e9d835a 100644 --- a/reals/fast/CRGeometricSum.v +++ b/reals/fast/CRGeometricSum.v @@ -19,20 +19,20 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Import CRAlternatingSum. -Require Import Qordfield. -Require Import QMinMax. -Require Import Qpossec. -Require Import Qpower. -Require Import Qauto. -Require Import Qabs. -Require Import CRcorrect. -Require Import CRIR. -Require Import iso_CReals. -Require Import Q_in_CReals. -Require Import Series. -Require Import Zdiv. -Require Import CornTac. +Require Import CoRN.reals.fast.CRAlternatingSum. +Require Import CoRN.model.ordfields.Qordfield. +Require Import CoRN.model.totalorder.QMinMax. +Require Import CoRN.model.structures.Qpossec. +Require Import Coq.QArith.Qpower. +Require Import CoRN.tactics.Qauto. +Require Import Coq.QArith.Qabs. +Require Import CoRN.reals.fast.CRcorrect. +Require Import CoRN.reals.fast.CRIR. +Require Import CoRN.reals.iso_CReals. +Require Import CoRN.reals.Q_in_CReals. +Require Import CoRN.reals.Series. +Require Import Coq.ZArith.Zdiv. +Require Import CoRN.tactics.CornTac. Set Implicit Arguments. diff --git a/reals/fast/CRGroupOps.v b/reals/fast/CRGroupOps.v index 1b67845c..e310fab5 100644 --- a/reals/fast/CRGroupOps.v +++ b/reals/fast/CRGroupOps.v @@ -19,15 +19,15 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Export CRmetric. -Require Import QMinMax. -Require Import COrdAbs. -Require Import Qordfield. -Require Import Qmetric. -Require Import CornTac. -Require Import ProductMetric. -Require Import stdlib_omissions.Pair. -Require Import canonical_names. +Require Export CoRN.model.metric2.CRmetric. +Require Import CoRN.model.totalorder.QMinMax. +Require Import CoRN.algebra.COrdAbs. +Require Import CoRN.model.ordfields.Qordfield. +Require Import CoRN.model.metric2.Qmetric. +Require Import CoRN.tactics.CornTac. +Require Import CoRN.metric2.ProductMetric. +Require Import CoRN.stdlib_omissions.Pair. +Require Import MathClasses.interfaces.canonical_names. Set Implicit Arguments. Set Automatic Introduction. diff --git a/reals/fast/CRIR.v b/reals/fast/CRIR.v index f36cec3b..5e60b13e 100644 --- a/reals/fast/CRIR.v +++ b/reals/fast/CRIR.v @@ -19,12 +19,12 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Export CauchySeq. -Require Import iso_CReals. -Require Import R_morphism. -Require Import CRArith. -Require Export CRreal. -Require Import CornTac. +Require Export CoRN.reals.CauchySeq. +Require Import CoRN.reals.iso_CReals. +Require Import CoRN.reals.R_morphism. +Require Import CoRN.reals.fast.CRArith. +Require Export CoRN.model.reals.CRreal. +Require Import CoRN.tactics.CornTac. Opaque CR inject_Q. (** diff --git a/reals/fast/CRabs.v b/reals/fast/CRabs.v index 63ffa844..f75172a8 100644 --- a/reals/fast/CRabs.v +++ b/reals/fast/CRabs.v @@ -19,15 +19,15 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Import Max_AbsIR. -Require Export CRArith. -Require Import Qmetric. -Require Import Qabs. -Require Import QMinMax. -Require Import CRcorrect. -Require Import CRIR. -Require Import CornTac. -Require Import Stability. +Require Import CoRN.reals.Max_AbsIR. +Require Export CoRN.reals.fast.CRArith. +Require Import CoRN.model.metric2.Qmetric. +Require Import Coq.QArith.Qabs. +Require Import CoRN.model.totalorder.QMinMax. +Require Import CoRN.reals.fast.CRcorrect. +Require Import CoRN.reals.fast.CRIR. +Require Import CoRN.tactics.CornTac. +Require Import CoRN.logic.Stability. Open Local Scope Q_scope. (** diff --git a/reals/fast/CRarctan.v b/reals/fast/CRarctan.v index 80eaac89..c28151d8 100644 --- a/reals/fast/CRarctan.v +++ b/reals/fast/CRarctan.v @@ -19,19 +19,19 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Export CRArith. -Require Import CRIR. -Require Import Q_in_CReals. -Require Import QMinMax. -Require Import CRarctan_small. -Require Import CRpi. -Require Import MoreArcTan. -Require Import ModulusDerivative. -Require Import ContinuousCorrect. -Require Import CornTac. -Require Import stdlib_omissions.Q. -Require Import abstract_algebra. -Require Import Psatz. +Require Export CoRN.reals.fast.CRArith. +Require Import CoRN.reals.fast.CRIR. +Require Import CoRN.reals.Q_in_CReals. +Require Import CoRN.model.totalorder.QMinMax. +Require Import CoRN.reals.fast.CRarctan_small. +Require Import CoRN.reals.fast.CRpi. +Require Import CoRN.transc.MoreArcTan. +Require Import CoRN.reals.fast.ModulusDerivative. +Require Import CoRN.reals.fast.ContinuousCorrect. +Require Import CoRN.tactics.CornTac. +Require Import CoRN.stdlib_omissions.Q. +Require Import MathClasses.interfaces.abstract_algebra. +Require Import Coq.micromega.Psatz. Set Implicit Arguments. Open Local Scope Q_scope. diff --git a/reals/fast/CRarctan_small.v b/reals/fast/CRarctan_small.v index d03659bb..5b32c41c 100644 --- a/reals/fast/CRarctan_small.v +++ b/reals/fast/CRarctan_small.v @@ -19,19 +19,19 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Import CRAlternatingSum. -Require Import CRseries. -Require Export CRArith. -Require Import CRIR. -Require Import Qpower. -Require Import Qordfield. -Require Import Q_in_CReals. -Require Import Qmetric. -Require Import QMinMax. -Require Import MoreArcTan. -Require Import CornTac. -Require Import abstract_algebra. -Require Import stdlib_omissions.Q. +Require Import CoRN.reals.fast.CRAlternatingSum. +Require Import CoRN.reals.fast.CRseries. +Require Export CoRN.reals.fast.CRArith. +Require Import CoRN.reals.fast.CRIR. +Require Import Coq.QArith.Qpower. +Require Import CoRN.model.ordfields.Qordfield. +Require Import CoRN.reals.Q_in_CReals. +Require Import CoRN.model.metric2.Qmetric. +Require Import CoRN.model.totalorder.QMinMax. +Require Import CoRN.transc.MoreArcTan. +Require Import CoRN.tactics.CornTac. +Require Import MathClasses.interfaces.abstract_algebra. +Require Import CoRN.stdlib_omissions.Q. Set Implicit Arguments. diff --git a/reals/fast/CRartanh_slow.v b/reals/fast/CRartanh_slow.v index 038ef725..35cf2542 100644 --- a/reals/fast/CRartanh_slow.v +++ b/reals/fast/CRartanh_slow.v @@ -19,20 +19,20 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Import CRAlternatingSum. -Require Import CRGeometricSum. -Require Import CRseries. -Require Export CRArith. -Require Import CRIR. -Require Import Qpower. -Require Import Qordfield. -Require Import Q_in_CReals. -Require Import Qmetric. -Require Import QMinMax. -Require Import ArTanH. -Require Import CRarctan_small. -Require Import Qauto. -Require Import CornTac. +Require Import CoRN.reals.fast.CRAlternatingSum. +Require Import CoRN.reals.fast.CRGeometricSum. +Require Import CoRN.reals.fast.CRseries. +Require Export CoRN.reals.fast.CRArith. +Require Import CoRN.reals.fast.CRIR. +Require Import Coq.QArith.Qpower. +Require Import CoRN.model.ordfields.Qordfield. +Require Import CoRN.reals.Q_in_CReals. +Require Import CoRN.model.metric2.Qmetric. +Require Import CoRN.model.totalorder.QMinMax. +Require Import CoRN.transc.ArTanH. +Require Import CoRN.reals.fast.CRarctan_small. +Require Import CoRN.tactics.Qauto. +Require Import CoRN.tactics.CornTac. Set Implicit Arguments. diff --git a/reals/fast/CRball.v b/reals/fast/CRball.v index 253fc481..1c882ed2 100644 --- a/reals/fast/CRball.v +++ b/reals/fast/CRball.v @@ -1,5 +1,5 @@ Require Import - Qabs CRArith CRabs. + Coq.QArith.Qabs CoRN.reals.fast.CRArith CoRN.reals.fast.CRabs. Hint Immediate CRle_refl. (* todo: move *) diff --git a/reals/fast/CRconst.v b/reals/fast/CRconst.v index 89495994..1d1eaccc 100644 --- a/reals/fast/CRconst.v +++ b/reals/fast/CRconst.v @@ -1,4 +1,4 @@ -Require Import Unicode.Utf8 Qmetric CRmetric UniformContinuity. +Require Import Coq.Unicode.Utf8 CoRN.model.metric2.Qmetric CoRN.model.metric2.CRmetric CoRN.metric2.UniformContinuity. Section const_fun_uc. diff --git a/reals/fast/CRcorrect.v b/reals/fast/CRcorrect.v index d9b2d531..a7ffd8b3 100644 --- a/reals/fast/CRcorrect.v +++ b/reals/fast/CRcorrect.v @@ -19,13 +19,13 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Import Cauchy_IR. -Require Import CornTac. -Require Import Omega. -Require Import Qmetric. -Require Import QMinMax. -Require Import Qabs. -Require Export CRFieldOps. +Require Import CoRN.model.reals.Cauchy_IR. +Require Import CoRN.tactics.CornTac. +Require Import Coq.omega.Omega. +Require Import CoRN.model.metric2.Qmetric. +Require Import CoRN.model.totalorder.QMinMax. +Require Import Coq.QArith.Qabs. +Require Export CoRN.reals.fast.CRFieldOps. Set Automatic Introduction. diff --git a/reals/fast/CRcos.v b/reals/fast/CRcos.v index efc25a1d..9a7a2211 100644 --- a/reals/fast/CRcos.v +++ b/reals/fast/CRcos.v @@ -19,21 +19,21 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Export CRArith. -Require Import CRsin. -Require Import CRpi. -Require Import CRIR. -Require Import Compress. -Require Import Qpower. -Require Import Qordfield. -Require Import Qround. -Require Import Pi. -Require Import ModulusDerivative. -Require Import ContinuousCorrect. -Require Import Qmetric. -Require Import SinCos. -Require Import CornTac. -Require Import abstract_algebra. +Require Export CoRN.reals.fast.CRArith. +Require Import CoRN.reals.fast.CRsin. +Require Import CoRN.reals.fast.CRpi. +Require Import CoRN.reals.fast.CRIR. +Require Import CoRN.reals.fast.Compress. +Require Import Coq.QArith.Qpower. +Require Import CoRN.model.ordfields.Qordfield. +Require Import Coq.QArith.Qround. +Require Import CoRN.transc.Pi. +Require Import CoRN.reals.fast.ModulusDerivative. +Require Import CoRN.reals.fast.ContinuousCorrect. +Require Import CoRN.model.metric2.Qmetric. +Require Import CoRN.transc.SinCos. +Require Import CoRN.tactics.CornTac. +Require Import MathClasses.interfaces.abstract_algebra. Opaque inj_Q CR Qmin Qmax. diff --git a/reals/fast/CRexp.v b/reals/fast/CRexp.v index 869171e6..30ae9647 100644 --- a/reals/fast/CRexp.v +++ b/reals/fast/CRexp.v @@ -19,29 +19,29 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Import QMinMax. -Require Import CRAlternatingSum. -Require Import CRseries. -Require Export CRArith. -Require Import CRIR. -Require Import iso_CReals. -Require Import Qpower. -Require Import COrdFields2. -Require Import Qordfield. -Require Import PowerSeries. -Require Import CRpower. -Require Import Exponential. -Require Import RealPowers. -Require Import Compress. -Require Import Ndigits. -Require Import ModulusDerivative. -Require Import ContinuousCorrect. -Require Import CRsign. -Require Import Q_in_CReals. -Require Import Qround. -Require Import CornTac. -Require Import theory.int_pow. -Require Import abstract_algebra. +Require Import CoRN.model.totalorder.QMinMax. +Require Import CoRN.reals.fast.CRAlternatingSum. +Require Import CoRN.reals.fast.CRseries. +Require Export CoRN.reals.fast.CRArith. +Require Import CoRN.reals.fast.CRIR. +Require Import CoRN.reals.iso_CReals. +Require Import Coq.QArith.Qpower. +Require Import CoRN.algebra.COrdFields2. +Require Import CoRN.model.ordfields.Qordfield. +Require Import CoRN.transc.PowerSeries. +Require Import CoRN.reals.fast.CRpower. +Require Import CoRN.transc.Exponential. +Require Import CoRN.transc.RealPowers. +Require Import CoRN.reals.fast.Compress. +Require Import Coq.NArith.Ndigits. +Require Import CoRN.reals.fast.ModulusDerivative. +Require Import CoRN.reals.fast.ContinuousCorrect. +Require Import CoRN.reals.fast.CRsign. +Require Import CoRN.reals.Q_in_CReals. +Require Import Coq.QArith.Qround. +Require Import CoRN.tactics.CornTac. +Require Import MathClasses.theory.int_pow. +Require Import MathClasses.interfaces.abstract_algebra. Set Implicit Arguments. diff --git a/reals/fast/CRln.v b/reals/fast/CRln.v index de7959ab..31820044 100644 --- a/reals/fast/CRln.v +++ b/reals/fast/CRln.v @@ -19,18 +19,18 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Import CRartanh_slow. -Require Export CRArith. -Require Import CRIR. -Require Import Qpower. -Require Import Qordfield. -Require Import ModulusDerivative. -Require Import ContinuousCorrect. -Require Import Qmetric. -Require Import Qauto. -Require Import Exponential. -Require Import ArTanH. -Require Import CornTac. +Require Import CoRN.reals.fast.CRartanh_slow. +Require Export CoRN.reals.fast.CRArith. +Require Import CoRN.reals.fast.CRIR. +Require Import Coq.QArith.Qpower. +Require Import CoRN.model.ordfields.Qordfield. +Require Import CoRN.reals.fast.ModulusDerivative. +Require Import CoRN.reals.fast.ContinuousCorrect. +Require Import CoRN.model.metric2.Qmetric. +Require Import CoRN.tactics.Qauto. +Require Import CoRN.transc.Exponential. +Require Import CoRN.transc.ArTanH. +Require Import CoRN.tactics.CornTac. Set Implicit Arguments. diff --git a/reals/fast/CRpi.v b/reals/fast/CRpi.v index b18c84e4..d677a76c 100644 --- a/reals/fast/CRpi.v +++ b/reals/fast/CRpi.v @@ -1,8 +1,8 @@ (* CRpi_fast is better for computation, but CRpi_slow is faster to compile, and may be prefered for development. *) (* Require Export CRpi_slow. *) -Require Export CRpi_fast. -Require Import CRsign. +Require Export CoRN.reals.fast.CRpi_fast. +Require Import CoRN.reals.fast.CRsign. Lemma CRpi_pos : (0 < CRpi)%CR. Proof. CR_solve_pos (1#10)%Qpos. Qed. diff --git a/reals/fast/CRpi_fast.v b/reals/fast/CRpi_fast.v index 2ad0f19f..8e0f49a9 100644 --- a/reals/fast/CRpi_fast.v +++ b/reals/fast/CRpi_fast.v @@ -19,15 +19,15 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Export CRArith. -Require Import CRIR. -Require Import Q_in_CReals. -Require Import QMinMax. -Require Import CRarctan_small. -Require Import MoreArcTan. -Require Import CornTac. -Require Import abstract_algebra. -Require Import stdlib_omissions.Q. +Require Export CoRN.reals.fast.CRArith. +Require Import CoRN.reals.fast.CRIR. +Require Import CoRN.reals.Q_in_CReals. +Require Import CoRN.model.totalorder.QMinMax. +Require Import CoRN.reals.fast.CRarctan_small. +Require Import CoRN.transc.MoreArcTan. +Require Import CoRN.tactics.CornTac. +Require Import MathClasses.interfaces.abstract_algebra. +Require Import CoRN.stdlib_omissions.Q. Set Implicit Arguments. diff --git a/reals/fast/CRpi_slow.v b/reals/fast/CRpi_slow.v index 5083d149..b3f71f21 100644 --- a/reals/fast/CRpi_slow.v +++ b/reals/fast/CRpi_slow.v @@ -19,14 +19,14 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Export CRArith. -Require Import CRIR. -Require Import Q_in_CReals. -Require Import QMinMax. -Require Import CRarctan_small. -Require Import MoreArcTan. -Require Import CornTac. -Require Import stdlib_omissions.Q. +Require Export CoRN.reals.fast.CRArith. +Require Import CoRN.reals.fast.CRIR. +Require Import CoRN.reals.Q_in_CReals. +Require Import CoRN.model.totalorder.QMinMax. +Require Import CoRN.reals.fast.CRarctan_small. +Require Import CoRN.transc.MoreArcTan. +Require Import CoRN.tactics.CornTac. +Require Import CoRN.stdlib_omissions.Q. Set Implicit Arguments. diff --git a/reals/fast/CRpower.v b/reals/fast/CRpower.v index b030b43a..1289597b 100644 --- a/reals/fast/CRpower.v +++ b/reals/fast/CRpower.v @@ -18,15 +18,15 @@ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Export CRIR. -Require Import CRArith. -Require Import Qpower. -Require Import ModulusDerivative. -Require Import ContinuousCorrect. -Require Import Qmetric. -Require Import CornTac. -Require Import canonical_names. -Require Import additional_operations. +Require Export CoRN.reals.fast.CRIR. +Require Import CoRN.reals.fast.CRArith. +Require Import Coq.QArith.Qpower. +Require Import CoRN.reals.fast.ModulusDerivative. +Require Import CoRN.reals.fast.ContinuousCorrect. +Require Import CoRN.model.metric2.Qmetric. +Require Import CoRN.tactics.CornTac. +Require Import MathClasses.interfaces.canonical_names. +Require Import MathClasses.interfaces.additional_operations. Opaque CR inj_Q. diff --git a/reals/fast/CRroot.v b/reals/fast/CRroot.v index 1f8b54b1..8f04786b 100644 --- a/reals/fast/CRroot.v +++ b/reals/fast/CRroot.v @@ -19,24 +19,24 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Import Q_in_CReals. -Require Import CRpower. -Require Export CRArith. -Require Import CRIR. -Require Import NRootIR. -Require Import QMinMax. -Require Import QposMinMax. -Require Import Qmetric. -Require Import Qpower. -Require Import Qordfield. -Require Import Compress. -Require Import Ndigits. -Require Import PowerBound. -Require Import RealPowers. -Require Import ContinuousCorrect. -Require Import Qauto. -Require Import CornTac. -Require Import abstract_algebra. +Require Import CoRN.reals.Q_in_CReals. +Require Import CoRN.reals.fast.CRpower. +Require Export CoRN.reals.fast.CRArith. +Require Import CoRN.reals.fast.CRIR. +Require Import CoRN.reals.NRootIR. +Require Import CoRN.model.totalorder.QMinMax. +Require Import CoRN.model.totalorder.QposMinMax. +Require Import CoRN.model.metric2.Qmetric. +Require Import Coq.QArith.Qpower. +Require Import CoRN.model.ordfields.Qordfield. +Require Import CoRN.reals.fast.Compress. +Require Import Coq.NArith.Ndigits. +Require Import CoRN.reals.fast.PowerBound. +Require Import CoRN.transc.RealPowers. +Require Import CoRN.reals.fast.ContinuousCorrect. +Require Import CoRN.tactics.Qauto. +Require Import CoRN.tactics.CornTac. +Require Import MathClasses.interfaces.abstract_algebra. Open Local Scope Q_scope. diff --git a/reals/fast/CRseries.v b/reals/fast/CRseries.v index ce1ad1ee..087f65f4 100644 --- a/reals/fast/CRseries.v +++ b/reals/fast/CRseries.v @@ -19,18 +19,18 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Import Program. -Require Import CRAlternatingSum. -Require Import CRGeometricSum. -Require Import Limit. -Require Import Qabs. -Require Import CornTac. -Require Import Arith. -Require Import Qordfield. -Require Import Qpower. -Require Import LazyNat. -Require Import Ring abstract_algebra theory.streams. -Require Export theory.series. +Require Import Coq.Program.Program. +Require Import CoRN.reals.fast.CRAlternatingSum. +Require Import CoRN.reals.fast.CRGeometricSum. +Require Import CoRN.metric2.Limit. +Require Import Coq.QArith.Qabs. +Require Import CoRN.tactics.CornTac. +Require Import Coq.Arith.Arith. +Require Import CoRN.model.ordfields.Qordfield. +Require Import Coq.QArith.Qpower. +Require Import CoRN.reals.fast.LazyNat. +Require Import Coq.setoid_ring.Ring MathClasses.interfaces.abstract_algebra MathClasses.theory.streams. +Require Export MathClasses.theory.series. Opaque Qabs. Open Local Scope Q_scope. diff --git a/reals/fast/CRsign.v b/reals/fast/CRsign.v index c4ec7133..8657b4a7 100644 --- a/reals/fast/CRsign.v +++ b/reals/fast/CRsign.v @@ -19,9 +19,9 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Export CRIR. -Require Import QMinMax. -Require Import CRArith. +Require Export CoRN.reals.fast.CRIR. +Require Import CoRN.model.totalorder.QMinMax. +Require Import CoRN.reals.fast.CRArith. (** ** Tactics for Inequalities diff --git a/reals/fast/CRsin.v b/reals/fast/CRsin.v index 1147767c..9be7198b 100644 --- a/reals/fast/CRsin.v +++ b/reals/fast/CRsin.v @@ -19,26 +19,26 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Import QMinMax. -Require Import CRAlternatingSum. -Require Import CRseries. -Require Import CRpi. -Require Export CRArith. -Require Import CRIR. -Require Import Qpower. -Require Import Qordfield. -Require Import Qround. -Require Import Pi. -Require Import ModulusDerivative. -Require Import ContinuousCorrect. -Require Import Qmetric. -Require Import PowerSeries. -Require Import SinCos. -Require Import Ndigits. -Require Import Compress. -Require Import PowerBound. -Require Import CornTac. -Require Import abstract_algebra. +Require Import CoRN.model.totalorder.QMinMax. +Require Import CoRN.reals.fast.CRAlternatingSum. +Require Import CoRN.reals.fast.CRseries. +Require Import CoRN.reals.fast.CRpi. +Require Export CoRN.reals.fast.CRArith. +Require Import CoRN.reals.fast.CRIR. +Require Import Coq.QArith.Qpower. +Require Import CoRN.model.ordfields.Qordfield. +Require Import Coq.QArith.Qround. +Require Import CoRN.transc.Pi. +Require Import CoRN.reals.fast.ModulusDerivative. +Require Import CoRN.reals.fast.ContinuousCorrect. +Require Import CoRN.model.metric2.Qmetric. +Require Import CoRN.transc.PowerSeries. +Require Import CoRN.transc.SinCos. +Require Import Coq.NArith.Ndigits. +Require Import CoRN.reals.fast.Compress. +Require Import CoRN.reals.fast.PowerBound. +Require Import CoRN.tactics.CornTac. +Require Import MathClasses.interfaces.abstract_algebra. Set Implicit Arguments. diff --git a/reals/fast/CRsum.v b/reals/fast/CRsum.v index 4997e2c9..c8b8df03 100644 --- a/reals/fast/CRsum.v +++ b/reals/fast/CRsum.v @@ -18,12 +18,12 @@ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Import CRArith. -Require Import List. -Require Import Qmetric. -Require Import Qring. -Require Import Qauto. -Require Import CornTac. +Require Import CoRN.reals.fast.CRArith. +Require Import CoRN.stdlib_omissions.List. +Require Import CoRN.model.metric2.Qmetric. +Require Import CoRN.model.rings.Qring. +Require Import CoRN.tactics.Qauto. +Require Import CoRN.tactics.CornTac. Open Local Scope Q_scope. diff --git a/reals/fast/CRtrans.v b/reals/fast/CRtrans.v index f8d610ab..dfc206dc 100644 --- a/reals/fast/CRtrans.v +++ b/reals/fast/CRtrans.v @@ -21,14 +21,14 @@ CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. (* This file rexports all the transcendental functions defined on CR *) -Require Export CRArith. -Require Export Compress. -Require Export CRpower. -Require Export CRroot. -Require Export CRexp. -Require Export CRln. -Require Export CRsin. -Require Export CRcos. -Require Export CRpi. -Require Export CRarctan. -Require Export CRabs. +Require Export CoRN.reals.fast.CRArith. +Require Export CoRN.reals.fast.Compress. +Require Export CoRN.reals.fast.CRpower. +Require Export CoRN.reals.fast.CRroot. +Require Export CoRN.reals.fast.CRexp. +Require Export CoRN.reals.fast.CRln. +Require Export CoRN.reals.fast.CRsin. +Require Export CoRN.reals.fast.CRcos. +Require Export CoRN.reals.fast.CRpi. +Require Export CoRN.reals.fast.CRarctan. +Require Export CoRN.reals.fast.CRabs. diff --git a/reals/fast/Compress.v b/reals/fast/Compress.v index 1d64e887..b1fe7ba5 100644 --- a/reals/fast/Compress.v +++ b/reals/fast/Compress.v @@ -19,11 +19,11 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Export CRmetric. -Require Import Qmetric. -Require Import COrdAbs. -Require Import Qordfield. -Require Import CornTac. +Require Export CoRN.model.metric2.CRmetric. +Require Import CoRN.model.metric2.Qmetric. +Require Import CoRN.algebra.COrdAbs. +Require Import CoRN.model.ordfields.Qordfield. +Require Import CoRN.tactics.CornTac. Opaque CR. diff --git a/reals/fast/ContinuousCorrect.v b/reals/fast/ContinuousCorrect.v index 2e878848..f87f3816 100644 --- a/reals/fast/ContinuousCorrect.v +++ b/reals/fast/ContinuousCorrect.v @@ -18,12 +18,12 @@ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Export Q_in_CReals. -Require Export MoreIntervals. -Require Export CRIR. -Require Import CornTac. -Require Export Qmetric. -Require Export QposMinMax. +Require Export CoRN.reals.Q_in_CReals. +Require Export CoRN.ftc.MoreIntervals. +Require Export CoRN.reals.fast.CRIR. +Require Import CoRN.tactics.CornTac. +Require Export CoRN.model.metric2.Qmetric. +Require Export CoRN.model.totalorder.QposMinMax. Opaque CR inj_Q. diff --git a/reals/fast/Integration.v b/reals/fast/Integration.v index 4d549408..cb182abe 100644 --- a/reals/fast/Integration.v +++ b/reals/fast/Integration.v @@ -19,29 +19,29 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Export IntegrableFunction. -Require Export BoundedFunction. -Require Export CRmetric. -Require Export CRArith. -Require Import LinfDistMonad. -Require Import CRIR. -Require Import Integral. -Require Import StepQsec. -Require Import OpenUnit. -Require Import QMinMax. -Require Import QposMinMax. -Require Import Qabs. -Require Import Qauto. -Require Import Qround. -Require Import L1metric. -Require Import LinfMetric. -Require Import Qordfield. -Require Import COrdFields2. -Require Import Qmetric. -Require Import ContinuousCorrect. -Require Import IntegrationRules. -Require Import MoreIntegrals. -Require Import CornTac. +Require Export CoRN.model.metric2.IntegrableFunction. +Require Export CoRN.model.metric2.BoundedFunction. +Require Export CoRN.model.metric2.CRmetric. +Require Export CoRN.reals.fast.CRArith. +Require Import CoRN.model.metric2.LinfDistMonad. +Require Import CoRN.reals.fast.CRIR. +Require Import CoRN.ftc.Integral. +Require Import CoRN.model.structures.StepQsec. +Require Import CoRN.model.structures.OpenUnit. +Require Import CoRN.model.totalorder.QMinMax. +Require Import CoRN.model.totalorder.QposMinMax. +Require Import Coq.QArith.Qabs. +Require Import CoRN.tactics.Qauto. +Require Import Coq.QArith.Qround. +Require Import CoRN.model.metric2.L1metric. +Require Import CoRN.model.metric2.LinfMetric. +Require Import CoRN.model.ordfields.Qordfield. +Require Import CoRN.algebra.COrdFields2. +Require Import CoRN.model.metric2.Qmetric. +Require Import CoRN.reals.fast.ContinuousCorrect. +Require Import CoRN.ftc.IntegrationRules. +Require Import CoRN.ftc.MoreIntegrals. +Require Import CoRN.tactics.CornTac. Set Implicit Arguments. diff --git a/reals/fast/Interval.v b/reals/fast/Interval.v index d9005aab..7e316318 100644 --- a/reals/fast/Interval.v +++ b/reals/fast/Interval.v @@ -18,17 +18,17 @@ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Export Compact. -Require Export CRArith. -Require Export Qmetric. -Require Import Qordfield. -Require Import COrdFields2. -Require Import Qround. -Require Import Qauto. -Require Import Qabs. -Require Import QMinMax. -Require Import Classic. -Require Import CornTac. +Require Export CoRN.metric2.Compact. +Require Export CoRN.reals.fast.CRArith. +Require Export CoRN.model.metric2.Qmetric. +Require Import CoRN.model.ordfields.Qordfield. +Require Import CoRN.algebra.COrdFields2. +Require Import Coq.QArith.Qround. +Require Import CoRN.tactics.Qauto. +Require Import Coq.QArith.Qabs. +Require Import CoRN.model.totalorder.QMinMax. +Require Import CoRN.logic.Classic. +Require Import CoRN.tactics.CornTac. Open Local Scope Q_scope. diff --git a/reals/fast/LazyNat.v b/reals/fast/LazyNat.v index d22ff167..c861d22b 100644 --- a/reals/fast/LazyNat.v +++ b/reals/fast/LazyNat.v @@ -19,7 +19,7 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Export BinPos. +Require Export Coq.PArith.BinPos. (** * Lazy Nat diff --git a/reals/fast/ModulusDerivative.v b/reals/fast/ModulusDerivative.v index a354fc66..940dd0ef 100644 --- a/reals/fast/ModulusDerivative.v +++ b/reals/fast/ModulusDerivative.v @@ -18,12 +18,12 @@ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Export Q_in_CReals. -Require Export CRIR. -Require Export Rolle. -Require Import CornTac. -Require Export Qmetric. -Require Export QMinMax. +Require Export CoRN.reals.Q_in_CReals. +Require Export CoRN.reals.fast.CRIR. +Require Export CoRN.ftc.Rolle. +Require Import CoRN.tactics.CornTac. +Require Export CoRN.model.metric2.Qmetric. +Require Export CoRN.model.totalorder.QMinMax. Opaque Qmin Qmax. Opaque CR inj_Q. diff --git a/reals/fast/MultivariatePolynomials.v b/reals/fast/MultivariatePolynomials.v index c098304a..80a49ab5 100644 --- a/reals/fast/MultivariatePolynomials.v +++ b/reals/fast/MultivariatePolynomials.v @@ -1,15 +1,15 @@ -Require Import Bernstein. -Require Import CRing_Homomorphisms. -Require Import COrdFields2. -Require Export Qordfield. -Require Import QMinMax. -Require Import CornTac. -Require Import Qauto. -Require Import Qmetric. -Require Import Qabs. -Require Import CRabs. -Require Import ModulusDerivative. -Require Import CRArith. +Require Import CoRN.algebra.Bernstein. +Require Import CoRN.algebra.CRing_Homomorphisms. +Require Import CoRN.algebra.COrdFields2. +Require Export CoRN.model.ordfields.Qordfield. +Require Import CoRN.model.totalorder.QMinMax. +Require Import CoRN.tactics.CornTac. +Require Import CoRN.tactics.Qauto. +Require Import CoRN.model.metric2.Qmetric. +Require Import Coq.QArith.Qabs. +Require Import CoRN.reals.fast.CRabs. +Require Import CoRN.reals.fast.ModulusDerivative. +Require Import CoRN.reals.fast.CRArith. Set Implicit Arguments. @@ -647,7 +647,7 @@ Proof. auto. Qed. -Require Import RSetoid. +Require Import CoRN.algebra.RSetoid. (** Definition of a setoid function type of n parameters *) Fixpoint n_Function X Y (n:nat) := diff --git a/reals/fast/Plot.v b/reals/fast/Plot.v index b328483d..2d7a9066 100644 --- a/reals/fast/Plot.v +++ b/reals/fast/Plot.v @@ -18,12 +18,12 @@ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Export RasterizeQ. -Require Import Interval. -Require Export Graph. -Require Import QMinMax. -Require Export QposMinMax. -Require Import CornTac. +Require Export CoRN.reals.fast.RasterizeQ. +Require Import CoRN.reals.fast.Interval. +Require Export CoRN.metric2.Graph. +Require Import CoRN.model.totalorder.QMinMax. +Require Export CoRN.model.totalorder.QposMinMax. +Require Import CoRN.tactics.CornTac. Section Plot. (** diff --git a/reals/fast/PowerBound.v b/reals/fast/PowerBound.v index 5e031aa4..15c4e0a0 100644 --- a/reals/fast/PowerBound.v +++ b/reals/fast/PowerBound.v @@ -19,13 +19,13 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Import Ndigits. -Require Import ZArith. -Require Import Basics. -Require Import Qordfield. -Require Import COrdFields2. -Require Import Qpower. -Require Import CornTac. +Require Import Coq.NArith.Ndigits. +Require Import Coq.ZArith.ZArith. +Require Import Coq.Program.Basics. +Require Import CoRN.model.ordfields.Qordfield. +Require Import CoRN.algebra.COrdFields2. +Require Import Coq.QArith.Qpower. +Require Import CoRN.tactics.CornTac. Open Local Scope Q_scope. diff --git a/reals/fast/RasterQ.v b/reals/fast/RasterQ.v index 46697682..d9e690b0 100644 --- a/reals/fast/RasterQ.v +++ b/reals/fast/RasterQ.v @@ -18,12 +18,12 @@ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Export Raster. -Require Import Interval. -Require Export FinEnum. -Require Export ProductMetric. -Require Import Classic. -Require Import CornTac. +Require Export CoRN.raster.Raster. +Require Import CoRN.reals.fast.Interval. +Require Export CoRN.metric2.FinEnum. +Require Export CoRN.metric2.ProductMetric. +Require Import CoRN.logic.Classic. +Require Import CoRN.tactics.CornTac. Set Implicit Arguments. (** diff --git a/reals/fast/RasterizeQ.v b/reals/fast/RasterizeQ.v index a5293d36..22665b0f 100644 --- a/reals/fast/RasterizeQ.v +++ b/reals/fast/RasterizeQ.v @@ -18,14 +18,14 @@ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Export RasterQ. -Require Import Interval. -Require Import Classic. -Require Import QposMinMax. -Require Import Qabs. -Require Import Qauto. -Require Import Qround. -Require Import CornTac. +Require Export CoRN.reals.fast.RasterQ. +Require Import CoRN.reals.fast.Interval. +Require Import CoRN.logic.Classic. +Require Import CoRN.model.totalorder.QposMinMax. +Require Import Coq.QArith.Qabs. +Require Import CoRN.tactics.Qauto. +Require Import Coq.QArith.Qround. +Require Import CoRN.tactics.CornTac. Open Local Scope Q_scope. diff --git a/reals/fast/uneven_CRplus.v b/reals/fast/uneven_CRplus.v index d1c93a9f..63015d6b 100644 --- a/reals/fast/uneven_CRplus.v +++ b/reals/fast/uneven_CRplus.v @@ -1,5 +1,5 @@ Require Import - QArith Qpossec Qmetric CRArith. + Coq.QArith.QArith CoRN.model.structures.Qpossec CoRN.model.metric2.Qmetric CoRN.reals.fast.CRArith. (** The approximation function for CRplus results distributes a given error evenly among its two operands. This is a perfectly reasonable implementation choice, diff --git a/reals/faster/AQmetric.v b/reals/faster/AQmetric.v index 8c3dfdc4..bcc2e6d2 100644 --- a/reals/faster/AQmetric.v +++ b/reals/faster/AQmetric.v @@ -1,8 +1,8 @@ Require Import - Program Ring Qdlog - Complete Prelength Qmetric CRmetric MetricMorphisms. + Coq.Program.Program Coq.setoid_ring.Ring CoRN.util.Qdlog + CoRN.metric2.Complete CoRN.metric2.Prelength CoRN.model.metric2.Qmetric CoRN.model.metric2.CRmetric CoRN.metric2.MetricMorphisms. Require Export - ApproximateRationals. + CoRN.reals.faster.ApproximateRationals. Section AQmetric. Context `{AppRationals AQ}. diff --git a/reals/faster/ARAlternatingSum.v b/reals/faster/ARAlternatingSum.v index 0e2215a7..87df1cdb 100644 --- a/reals/faster/ARAlternatingSum.v +++ b/reals/faster/ARAlternatingSum.v @@ -1,8 +1,8 @@ Require Import - Program CornTac workaround_tactics - Qmetric CRAlternatingSum Qdlog - ApproximateRationals ARArith - abstract_algebra int_pow theory.streams theory.series. + Coq.Program.Program CoRN.tactics.CornTac MathClasses.misc.workaround_tactics + CoRN.model.metric2.Qmetric CoRN.reals.fast.CRAlternatingSum CoRN.util.Qdlog + CoRN.reals.faster.ApproximateRationals CoRN.reals.faster.ARArith + MathClasses.interfaces.abstract_algebra MathClasses.theory.int_pow MathClasses.theory.streams MathClasses.theory.series. Section alt_sum. Context `{AppRationals AQ}. diff --git a/reals/faster/ARArith.v b/reals/faster/ARArith.v index cf1e81eb..63df1cbe 100644 --- a/reals/faster/ARArith.v +++ b/reals/faster/ARArith.v @@ -1,13 +1,13 @@ Require Import - Program Ring CLogic - Qabs stdlib_omissions.Q workaround_tactics - QMinMax QposMinMax Qdlog - Complete Prelength Qmetric MetricMorphisms - CRArith CRpower Qposclasses - stdlib_binary_naturals minmax positive_semiring_elements. + Coq.Program.Program Coq.setoid_ring.Ring CoRN.logic.CLogic + Coq.QArith.Qabs CoRN.stdlib_omissions.Q MathClasses.misc.workaround_tactics + CoRN.model.totalorder.QMinMax CoRN.model.totalorder.QposMinMax CoRN.util.Qdlog + CoRN.metric2.Complete CoRN.metric2.Prelength CoRN.model.metric2.Qmetric CoRN.metric2.MetricMorphisms + CoRN.reals.fast.CRArith CoRN.reals.fast.CRpower CoRN.classes.Qposclasses + MathClasses.implementations.stdlib_binary_naturals MathClasses.orders.minmax MathClasses.implementations.positive_semiring_elements. Require Export - ApproximateRationals - AQmetric. + CoRN.reals.faster.ApproximateRationals + CoRN.reals.faster.AQmetric. Section ARarith. Context `{AppRationals AQ}. diff --git a/reals/faster/ARQ.v b/reals/faster/ARQ.v index ca01ce20..d1c768b5 100644 --- a/reals/faster/ARQ.v +++ b/reals/faster/ARQ.v @@ -1,8 +1,8 @@ Require Import - Program QArith Qdlog ZArith Qpossec Compress - MetricMorphisms Qmetric ARArith - theory.int_pow theory.nat_pow - stdlib_rationals stdlib_binary_integers. + Coq.Program.Program Coq.QArith.QArith CoRN.util.Qdlog Coq.ZArith.ZArith CoRN.model.structures.Qpossec CoRN.reals.fast.Compress + CoRN.metric2.MetricMorphisms CoRN.model.metric2.Qmetric CoRN.reals.faster.ARArith + MathClasses.theory.int_pow MathClasses.theory.nat_pow + MathClasses.implementations.stdlib_rationals MathClasses.implementations.stdlib_binary_integers. Instance Q_approx: AppApprox Q := λ x k, match k with diff --git a/reals/faster/ARarctan.v b/reals/faster/ARarctan.v index ed5a78f2..a69a5107 100644 --- a/reals/faster/ARarctan.v +++ b/reals/faster/ARarctan.v @@ -1,8 +1,8 @@ Require Import - CRarctan_small CRarctan CRpi_fast - MetricMorphisms ARpi ARarctan_small. + CoRN.reals.fast.CRarctan_small CoRN.reals.fast.CRarctan CoRN.reals.fast.CRpi_fast + CoRN.metric2.MetricMorphisms CoRN.reals.faster.ARpi CoRN.reals.faster.ARarctan_small. Require Export - ARArith. + CoRN.reals.faster.ARArith. Section ARarctan. Context `{AppRationals AQ}. diff --git a/reals/faster/ARarctan_small.v b/reals/faster/ARarctan_small.v index 95b00dcb..e7600739 100644 --- a/reals/faster/ARarctan_small.v +++ b/reals/faster/ARarctan_small.v @@ -1,10 +1,10 @@ Require Import - Field stdlib_omissions.Q - CRarctan_small CRarctan CRseries CRAlternatingSum - ARAlternatingSum abstract_algebra - nat_pow int_pow. + Coq.setoid_ring.Field CoRN.stdlib_omissions.Q + CoRN.reals.fast.CRarctan_small CoRN.reals.fast.CRarctan CoRN.reals.fast.CRseries CoRN.reals.fast.CRAlternatingSum + CoRN.reals.faster.ARAlternatingSum MathClasses.interfaces.abstract_algebra + MathClasses.theory.nat_pow MathClasses.theory.int_pow. Require Export - ARArith. + CoRN.reals.faster.ARArith. Section ARarctan_small. Context `{AppRationals AQ}. diff --git a/reals/faster/ARbigD.v b/reals/faster/ARbigD.v index 4676da1a..19bbace6 100644 --- a/reals/faster/ARbigD.v +++ b/reals/faster/ARbigD.v @@ -1,8 +1,8 @@ Require Import - Program QArith ZArith BigZ Qpossec - MetricMorphisms Qmetric Qdlog ARArith - theory.int_pow theory.nat_pow - stdlib_rationals stdlib_binary_integers fast_integers dyadics. + Coq.Program.Program Coq.QArith.QArith Coq.ZArith.ZArith Coq.Numbers.Integer.BigZ.BigZ CoRN.model.structures.Qpossec + CoRN.metric2.MetricMorphisms CoRN.model.metric2.Qmetric CoRN.util.Qdlog CoRN.reals.faster.ARArith + MathClasses.theory.int_pow MathClasses.theory.nat_pow + MathClasses.implementations.stdlib_rationals MathClasses.implementations.stdlib_binary_integers MathClasses.implementations.fast_integers MathClasses.implementations.dyadics. Add Field Q : (dec_fields.stdlib_field_theory Q). diff --git a/reals/faster/ARbigQ.v b/reals/faster/ARbigQ.v index f369ea4a..8e708e72 100644 --- a/reals/faster/ARbigQ.v +++ b/reals/faster/ARbigQ.v @@ -1,9 +1,9 @@ Require Import - Program QArith ZArith BigZ BigQ Qpossec - Compress ARQ - MetricMorphisms Qmetric ARArith - stdlib_rationals stdlib_binary_integers field_of_fractions - fast_rationals fast_integers. + Coq.Program.Program Coq.QArith.QArith Coq.ZArith.ZArith Coq.Numbers.Integer.BigZ.BigZ Coq.Numbers.Rational.BigQ.BigQ CoRN.model.structures.Qpossec + CoRN.reals.fast.Compress CoRN.reals.faster.ARQ + CoRN.metric2.MetricMorphisms CoRN.model.metric2.Qmetric CoRN.reals.faster.ARArith + MathClasses.implementations.stdlib_rationals MathClasses.implementations.stdlib_binary_integers MathClasses.implementations.field_of_fractions + MathClasses.implementations.fast_rationals MathClasses.implementations.fast_integers. Instance inject_Z_bigQ: Cast Z bigQ := cast bigZ bigQ ∘ cast Z bigZ. diff --git a/reals/faster/ARcos.v b/reals/faster/ARcos.v index d6791c72..47d33e23 100644 --- a/reals/faster/ARcos.v +++ b/reals/faster/ARcos.v @@ -1,8 +1,8 @@ Require Import - workaround_tactics - CRsin CRcos MetricMorphisms Complete ARsin abstract_algebra. + MathClasses.misc.workaround_tactics + CoRN.reals.fast.CRsin CoRN.reals.fast.CRcos CoRN.metric2.MetricMorphisms CoRN.metric2.Complete CoRN.reals.faster.ARsin MathClasses.interfaces.abstract_algebra. Require Export - ARArith. + CoRN.reals.faster.ARArith. Section ARcos. Context `{AppRationals AQ}. diff --git a/reals/faster/ARexp.v b/reals/faster/ARexp.v index e0f62cea..e90c514f 100644 --- a/reals/faster/ARexp.v +++ b/reals/faster/ARexp.v @@ -1,11 +1,11 @@ Require Import - Program workaround_tactics - QMinMax Qround Qdlog stdlib_omissions.Q - CRexp CRseries CRAlternatingSum Compress - MetricMorphisms ARAlternatingSum abstract_algebra - minmax nat_pow int_pow. + Coq.Program.Program MathClasses.misc.workaround_tactics + CoRN.model.totalorder.QMinMax Coq.QArith.Qround CoRN.util.Qdlog CoRN.stdlib_omissions.Q + CoRN.reals.fast.CRexp CoRN.reals.fast.CRseries CoRN.reals.fast.CRAlternatingSum CoRN.reals.fast.Compress + CoRN.metric2.MetricMorphisms CoRN.reals.faster.ARAlternatingSum MathClasses.interfaces.abstract_algebra + MathClasses.orders.minmax MathClasses.theory.nat_pow MathClasses.theory.int_pow. Require Export - ARArith. + CoRN.reals.faster.ARArith. Section ARexp. Context `{AppRationals AQ}. diff --git a/reals/faster/ARpi.v b/reals/faster/ARpi.v index 640fc805..9955d801 100644 --- a/reals/faster/ARpi.v +++ b/reals/faster/ARpi.v @@ -1,7 +1,7 @@ Require Import - stdlib_omissions.Q - CRpi_fast CRarctan_small - abstract_algebra ARarctan_small. + CoRN.stdlib_omissions.Q + CoRN.reals.fast.CRpi_fast CoRN.reals.fast.CRarctan_small + MathClasses.interfaces.abstract_algebra CoRN.reals.faster.ARarctan_small. Section ARpi. Context `{AppRationals AQ}. diff --git a/reals/faster/ARroot.v b/reals/faster/ARroot.v index dfe27504..d39219a8 100644 --- a/reals/faster/ARroot.v +++ b/reals/faster/ARroot.v @@ -1,10 +1,10 @@ Require Import - Ring stdlib_omissions.Z - Complete Qmetric ZArith Qdlog Qpossec - CRroot - abstract_algebra theory.shiftl theory.nat_pow theory.int_pow. + Coq.setoid_ring.Ring CoRN.stdlib_omissions.Z + CoRN.metric2.Complete CoRN.model.metric2.Qmetric Coq.ZArith.ZArith CoRN.util.Qdlog CoRN.model.structures.Qpossec + CoRN.reals.fast.CRroot + MathClasses.interfaces.abstract_algebra MathClasses.theory.shiftl MathClasses.theory.nat_pow MathClasses.theory.int_pow. Require Export - ARArith. + CoRN.reals.faster.ARArith. Section ARsqrt. Context `{AppRationals AQ}. @@ -430,7 +430,7 @@ Proof. Qed. Local Obligation Tactic := idtac. -Require Import MetricMorphisms. +Require Import CoRN.metric2.MetricMorphisms. Program Definition ARsqrt_uc := unary_complete_uc QPrelengthSpace (cast AQ Q_as_MetricSpace) AQsqrt sqrt_uc _. diff --git a/reals/faster/ARsign.v b/reals/faster/ARsign.v index 97c57161..0ac9e0c6 100644 --- a/reals/faster/ARsign.v +++ b/reals/faster/ARsign.v @@ -1,4 +1,4 @@ -Require Import ZArith ARArith. +Require Import Coq.ZArith.ZArith CoRN.reals.faster.ARArith. Ltac AR_solve_pos_loop k := (apply AR_epsilon_sign_dec_pos with k; diff --git a/reals/faster/ARsin.v b/reals/faster/ARsin.v index 9d30d29c..79888df7 100644 --- a/reals/faster/ARsin.v +++ b/reals/faster/ARsin.v @@ -1,11 +1,11 @@ Require Import - Program workaround_tactics - QMinMax Qround Qdlog stdlib_omissions.Q - CRsin CRseries CRAlternatingSum Compress - MetricMorphisms ARAlternatingSum abstract_algebra - minmax nat_pow int_pow. + Coq.Program.Program MathClasses.misc.workaround_tactics + CoRN.model.totalorder.QMinMax Coq.QArith.Qround CoRN.util.Qdlog CoRN.stdlib_omissions.Q + CoRN.reals.fast.CRsin CoRN.reals.fast.CRseries CoRN.reals.fast.CRAlternatingSum CoRN.reals.fast.Compress + CoRN.metric2.MetricMorphisms CoRN.reals.faster.ARAlternatingSum MathClasses.interfaces.abstract_algebra + MathClasses.orders.minmax MathClasses.theory.nat_pow MathClasses.theory.int_pow. Require Export - ARArith. + CoRN.reals.faster.ARArith. Section ARsin. Context `{AppRationals AQ}. diff --git a/reals/faster/ARtrans.v b/reals/faster/ARtrans.v index 16c2f2dd..e60b4a8f 100644 --- a/reals/faster/ARtrans.v +++ b/reals/faster/ARtrans.v @@ -1,7 +1,7 @@ -Require Export ARArith. -Require Export ARroot. -Require Export ARexp. -Require Export ARsin. -Require Export ARcos. -Require Export ARpi. -Require Export ARarctan. +Require Export CoRN.reals.faster.ARArith. +Require Export CoRN.reals.faster.ARroot. +Require Export CoRN.reals.faster.ARexp. +Require Export CoRN.reals.faster.ARsin. +Require Export CoRN.reals.faster.ARcos. +Require Export CoRN.reals.faster.ARpi. +Require Export CoRN.reals.faster.ARarctan. diff --git a/reals/faster/ApproximateRationals.v b/reals/faster/ApproximateRationals.v index 10e8f686..5f1a40cb 100644 --- a/reals/faster/ApproximateRationals.v +++ b/reals/faster/ApproximateRationals.v @@ -1,13 +1,13 @@ Require - implementations.stdlib_rationals positive_semiring_elements. + MathClasses.implementations.stdlib_rationals MathClasses.implementations.positive_semiring_elements. Require Import - Program - CornTac workaround_tactics - stdlib_omissions.Q Qdlog Qmetric Qabs Qclasses QMinMax - RSetoid CSetoids MetricMorphisms - orders.minmax orders.dec_fields theory.abs theory.shiftl theory.int_pow. + Coq.Program.Program + CoRN.tactics.CornTac MathClasses.misc.workaround_tactics + CoRN.stdlib_omissions.Q CoRN.util.Qdlog CoRN.model.metric2.Qmetric Coq.QArith.Qabs CoRN.classes.Qclasses CoRN.model.totalorder.QMinMax + CoRN.algebra.RSetoid CoRN.algebra.CSetoids CoRN.metric2.MetricMorphisms + MathClasses.orders.minmax MathClasses.orders.dec_fields MathClasses.theory.abs MathClasses.theory.shiftl MathClasses.theory.int_pow. Require Export - abstract_algebra interfaces.additional_operations interfaces.orders. + MathClasses.interfaces.abstract_algebra MathClasses.interfaces.additional_operations MathClasses.interfaces.orders. (* We describe the approximate rationals as a ring that is dense in the rationals *) diff --git a/reals/iso_CReals.v b/reals/iso_CReals.v index 59416430..b97a124d 100644 --- a/reals/iso_CReals.v +++ b/reals/iso_CReals.v @@ -37,8 +37,8 @@ (* in this file the concrete canonical isomorphism -in te sense of R_morphisms.v - between two arbitrary model of real numbers is built *) -Require Export Q_dense. -Require Export R_morphism. +Require Export CoRN.reals.Q_dense. +Require Export CoRN.reals.R_morphism. Lemma less_pres_Lim : forall (IR : CReals) (g h : R_COrdField IR), Lim g[<]Lim h -> g[<]h. diff --git a/stdlib_omissions/List.v b/stdlib_omissions/List.v index f6adeeef..7dfc76c5 100644 --- a/stdlib_omissions/List.v +++ b/stdlib_omissions/List.v @@ -1,7 +1,7 @@ -Require Export Lists.List. +Require Export Coq.Lists.List. Require Import - Unicode.Utf8 Setoid Permutation Setoid Morphisms stdlib_omissions.Pair. + Coq.Unicode.Utf8 Coq.Setoids.Setoid Coq.Sorting.Permutation Coq.Setoids.Setoid Coq.Classes.Morphisms CoRN.stdlib_omissions.Pair. Fixpoint zip {A B} (a: list A) (b: list B): list (A * B) := match a, b with diff --git a/stdlib_omissions/N.v b/stdlib_omissions/N.v index 20592747..5e4cc005 100644 --- a/stdlib_omissions/N.v +++ b/stdlib_omissions/N.v @@ -1,4 +1,4 @@ -Require Import List. +Require Import CoRN.stdlib_omissions.List. Fixpoint enum (n: nat): list nat := match n with diff --git a/stdlib_omissions/P.v b/stdlib_omissions/P.v index 0877552d..ced904b3 100644 --- a/stdlib_omissions/P.v +++ b/stdlib_omissions/P.v @@ -1,5 +1,5 @@ -Require Import Setoid BinPos Pnat. +Require Import Coq.Setoids.Setoid Coq.PArith.BinPos Coq.PArith.Pnat. Set Automatic Introduction. diff --git a/stdlib_omissions/Pair.v b/stdlib_omissions/Pair.v index c2ff24c1..fce87533 100644 --- a/stdlib_omissions/Pair.v +++ b/stdlib_omissions/Pair.v @@ -1,4 +1,4 @@ -Require Import Unicode.Utf8 Setoid Lists.List. +Require Import Coq.Unicode.Utf8 Coq.Setoids.Setoid Coq.Lists.List. Section pair_rel. diff --git a/stdlib_omissions/Q.v b/stdlib_omissions/Q.v index 69f35424..41f8d835 100644 --- a/stdlib_omissions/Q.v +++ b/stdlib_omissions/Q.v @@ -1,8 +1,8 @@ Require Import - QArith ZArith NArith Qpower Qround - Qround Qabs List. + Coq.QArith.QArith Coq.ZArith.ZArith Coq.NArith.NArith Coq.QArith.Qpower Coq.QArith.Qround + Coq.QArith.Qround Coq.QArith.Qabs CoRN.stdlib_omissions.List. -Require stdlib_omissions.Z. +Require CoRN.stdlib_omissions.Z. Set Automatic Introduction. diff --git a/stdlib_omissions/Z.v b/stdlib_omissions/Z.v index 9f8efbb6..7a4fb006 100644 --- a/stdlib_omissions/Z.v +++ b/stdlib_omissions/Z.v @@ -1,5 +1,5 @@ -Require Import ZArith NPeano stdlib_omissions.P. +Require Import Coq.ZArith.ZArith Coq.Numbers.Natural.Peano.NPeano CoRN.stdlib_omissions.P. Open Scope Z_scope. diff --git a/tactics/AlgReflection.v b/tactics/AlgReflection.v index 4a8facae..08de9235 100644 --- a/tactics/AlgReflection.v +++ b/tactics/AlgReflection.v @@ -35,7 +35,7 @@ *) (* begin hide *) -Require Export CLogic. +Require Export CoRN.logic.CLogic. Require Export Coq.Bool.Bool. Section Syntactic_Expressions. diff --git a/tactics/CornTac.v b/tactics/CornTac.v index 0d9a6d5d..f048e26c 100644 --- a/tactics/CornTac.v +++ b/tactics/CornTac.v @@ -19,7 +19,7 @@ (** Generic Tacticals used by the CoRN project *) (* begin hide *) -Require Import SetoidTactics. +Require Import Coq.Classes.SetoidTactics. (* Implements an apply-like tactic that uses refine's strong unifcation algorithm REPLACED by ssr apply diff --git a/tactics/DiffTactics2.v b/tactics/DiffTactics2.v index 366b919f..a40ca16b 100644 --- a/tactics/DiffTactics2.v +++ b/tactics/DiffTactics2.v @@ -35,7 +35,7 @@ *) (* begin hide *) -Require Export Differentiability. +Require Export CoRN.ftc.Differentiability. Section Automatizing_Continuity. diff --git a/tactics/DiffTactics3.v b/tactics/DiffTactics3.v index d8f7c046..cc7b144f 100644 --- a/tactics/DiffTactics3.v +++ b/tactics/DiffTactics3.v @@ -35,9 +35,9 @@ *) (* begin hide *) -Require Export MoreFunSeries. -Require Export Composition. -Require Export DiffTactics2. +Require Export CoRN.ftc.MoreFunSeries. +Require Export CoRN.ftc.Composition. +Require Export CoRN.tactics.DiffTactics2. Ltac Deriv_substR := match goal with diff --git a/tactics/FieldReflection.v b/tactics/FieldReflection.v index 158adc97..9cffff9f 100644 --- a/tactics/FieldReflection.v +++ b/tactics/FieldReflection.v @@ -35,8 +35,8 @@ *) (* begin hide *) -Require Export CFields. -Require Export AlgReflection. +Require Export CoRN.algebra.CFields. +Require Export CoRN.tactics.AlgReflection. Section Field_Interpretation_Function. diff --git a/tactics/Qauto.v b/tactics/Qauto.v index 6712c997..dbf10627 100644 --- a/tactics/Qauto.v +++ b/tactics/Qauto.v @@ -19,11 +19,11 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Export Qordfield. -Require Import COrdFields2. -Require Import Qpower. -Require Import Qabs. -Require Import CornTac. +Require Export CoRN.model.ordfields.Qordfield. +Require Import CoRN.algebra.COrdFields2. +Require Import Coq.QArith.Qpower. +Require Import Coq.QArith.Qabs. +Require Import CoRN.tactics.CornTac. Ltac Qauto_pos := repeat (first [ assumption diff --git a/tactics/Rational.v b/tactics/Rational.v index 0c60fe39..04c5a7ac 100644 --- a/tactics/Rational.v +++ b/tactics/Rational.v @@ -33,9 +33,9 @@ * with this work; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export FieldReflection. -Require Export RingReflection. -Require Export CRing_as_Ring. +Require Export CoRN.tactics.FieldReflection. +Require Export CoRN.tactics.RingReflection. +Require Export CoRN.algebra.CRing_as_Ring. Inductive AlgebraName : Type := |cfield : CField -> AlgebraName diff --git a/tactics/RingReflection.v b/tactics/RingReflection.v index 20914eef..dd611775 100644 --- a/tactics/RingReflection.v +++ b/tactics/RingReflection.v @@ -35,8 +35,8 @@ *) (* begin hide *) -Require Export CRings. -Require Export AlgReflection. +Require Export CoRN.algebra.CRings. +Require Export CoRN.tactics.AlgReflection. Section Ring_Interpretation_Function. diff --git a/tactics/csetoid_rewrite.v b/tactics/csetoid_rewrite.v index 4c13b655..5155bd56 100644 --- a/tactics/csetoid_rewrite.v +++ b/tactics/csetoid_rewrite.v @@ -45,7 +45,7 @@ in Coq's initial environment. Ltac typeof x := type of x. (* Quickly secure "type of" before the following Require brings in ssreflect which destroys it. *) -Require Export CSetoidFun. +Require Export CoRN.algebra.CSetoidFun. Section move_us. diff --git a/transc/ArTanH.v b/transc/ArTanH.v index b128c9b1..105fef96 100644 --- a/transc/ArTanH.v +++ b/transc/ArTanH.v @@ -16,8 +16,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export Exponential. -Require Import CornTac. +Require Export CoRN.transc.Exponential. +Require Import CoRN.tactics.CornTac. (** * Inverse Hyperbolic Tangent Function diff --git a/transc/Exponential.v b/transc/Exponential.v index 37ab38ec..a25ba3ca 100644 --- a/transc/Exponential.v +++ b/transc/Exponential.v @@ -34,7 +34,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export TaylorSeries. +Require Export CoRN.transc.TaylorSeries. Opaque Min Max. diff --git a/transc/InvTrigonom.v b/transc/InvTrigonom.v index 08025507..eab39e1a 100644 --- a/transc/InvTrigonom.v +++ b/transc/InvTrigonom.v @@ -34,9 +34,9 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export RealPowers. -Require Export TrigMon. -Require Export StrongIVT. +Require Export CoRN.transc.RealPowers. +Require Export CoRN.transc.TrigMon. +Require Export CoRN.ftc.StrongIVT. (** printing ArcSin %\ensuremath{\arcsin}% *) (** printing ArcCos %\ensuremath{\arccos}% *) diff --git a/transc/MoreArcTan.v b/transc/MoreArcTan.v index 857c86cb..838e02dd 100644 --- a/transc/MoreArcTan.v +++ b/transc/MoreArcTan.v @@ -19,8 +19,8 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE PROOF OR THE USE OR OTHER DEALINGS IN THE PROOF. *) -Require Export InvTrigonom. -Require Import CornTac. +Require Export CoRN.transc.InvTrigonom. +Require Import CoRN.tactics.CornTac. (** Various properties of ArcTangent.*) diff --git a/transc/Pi.v b/transc/Pi.v index e6799b99..900242d3 100644 --- a/transc/Pi.v +++ b/transc/Pi.v @@ -35,8 +35,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Import CornTac. -Require Export SinCos. +Require Import CoRN.tactics.CornTac. +Require Export CoRN.transc.SinCos. Section Properties_of_Pi. diff --git a/transc/PowerSeries.v b/transc/PowerSeries.v index deec1451..554f59c7 100644 --- a/transc/PowerSeries.v +++ b/transc/PowerSeries.v @@ -40,7 +40,7 @@ (** printing Log %\ensuremath{\log}% *) (** printing Tan %\ensuremath{\tan}% *) -Require Export FTC. +Require Export CoRN.ftc.FTC. (** * More on Power Series diff --git a/transc/RealPowers.v b/transc/RealPowers.v index b7a328d5..757104b6 100644 --- a/transc/RealPowers.v +++ b/transc/RealPowers.v @@ -37,7 +37,7 @@ (** printing [!] %\ensuremath{\hat{\ }}% #^# *) (** printing {!} %\ensuremath{\hat{\ }}% #^# *) -Require Export Exponential. +Require Export CoRN.transc.Exponential. Opaque Expon. diff --git a/transc/SinCos.v b/transc/SinCos.v index b66d7cb6..61616efb 100644 --- a/transc/SinCos.v +++ b/transc/SinCos.v @@ -34,7 +34,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export Trigonometric. +Require Export CoRN.transc.Trigonometric. Section Sum_and_so_on. diff --git a/transc/TaylorSeries.v b/transc/TaylorSeries.v index 481ce2a0..dbd9f748 100644 --- a/transc/TaylorSeries.v +++ b/transc/TaylorSeries.v @@ -34,8 +34,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export PowerSeries. -Require Export Taylor. +Require Export CoRN.transc.PowerSeries. +Require Export CoRN.ftc.Taylor. (** * Taylor Series diff --git a/transc/TrigMon.v b/transc/TrigMon.v index c0c5f083..7392eb3e 100644 --- a/transc/TrigMon.v +++ b/transc/TrigMon.v @@ -34,8 +34,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export Pi. -Require Import CornTac. +Require Export CoRN.transc.Pi. +Require Import CoRN.tactics.CornTac. Opaque Sine Cosine. diff --git a/transc/Trigonometric.v b/transc/Trigonometric.v index 754b095c..cb6ba5a3 100644 --- a/transc/Trigonometric.v +++ b/transc/Trigonometric.v @@ -34,7 +34,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -Require Export TaylorSeries. +Require Export CoRN.transc.TaylorSeries. (** * The Trigonometric Functions diff --git a/util/Container.v b/util/Container.v index 1e5078d7..2e1a6ece 100644 --- a/util/Container.v +++ b/util/Container.v @@ -1,4 +1,4 @@ -Require Import canonical_names. +Require Import MathClasses.interfaces.canonical_names. Class Container (Elem C: Type) := In: C → Elem → Prop. Hint Unfold In. diff --git a/util/Extract.v b/util/Extract.v index cc646d06..afa99643 100644 --- a/util/Extract.v +++ b/util/Extract.v @@ -1,4 +1,4 @@ -Require Import CRtrans. +Require Import CoRN.reals.fast.CRtrans. Extraction Language Haskell. diff --git a/util/PointFree.v b/util/PointFree.v index 96e210ba..df694d62 100644 --- a/util/PointFree.v +++ b/util/PointFree.v @@ -1,4 +1,4 @@ -Require Import Program Unicode.Utf8 stdlib_omissions.Pair. +Require Import Coq.Program.Program Coq.Unicode.Utf8 CoRN.stdlib_omissions.Pair. Generalizable All Variables. (** In the following type class, r is an "output parameter" in the sense diff --git a/util/Qdlog.v b/util/Qdlog.v index 5616b172..9c0fd4df 100644 --- a/util/Qdlog.v +++ b/util/Qdlog.v @@ -1,8 +1,8 @@ (* Discrete logarithm with base 2 and 4 on [Q] *) Require Import - ZArith QArith Qround stdlib_omissions.Q - abstract_algebra additional_operations interfaces.orders - int_pow orders.rationals stdlib_rationals positive_semiring_elements. + Coq.ZArith.ZArith Coq.QArith.QArith Coq.QArith.Qround CoRN.stdlib_omissions.Q + MathClasses.interfaces.abstract_algebra MathClasses.interfaces.additional_operations MathClasses.interfaces.orders + MathClasses.theory.int_pow MathClasses.orders.rationals MathClasses.implementations.stdlib_rationals MathClasses.implementations.positive_semiring_elements. Definition Qdlog2 (x : Q) : Z := match decide_rel (≤) x 1 with diff --git a/util/Qgcd.v b/util/Qgcd.v index eb4e62f8..154129eb 100644 --- a/util/Qgcd.v +++ b/util/Qgcd.v @@ -1,6 +1,6 @@ Require Import - QArith ZGcd Qpossec stdlib_omissions.Q. + Coq.QArith.QArith CoRN.model.Zmod.ZGcd CoRN.model.structures.Qpossec CoRN.stdlib_omissions.Q. Set Automatic Introduction. Open Scope Q_scope. diff --git a/util/Qsums.v b/util/Qsums.v index f8708139..85dcdb1f 100644 --- a/util/Qsums.v +++ b/util/Qsums.v @@ -1,10 +1,10 @@ Require Import - List NPeano - QArith Qabs Qpossec Qmetric - Program - stdlib_omissions.N - stdlib_omissions.Z - stdlib_omissions.Q. + CoRN.stdlib_omissions.List Coq.Numbers.Natural.Peano.NPeano + Coq.QArith.QArith Coq.QArith.Qabs CoRN.model.structures.Qpossec CoRN.model.metric2.Qmetric + Coq.Program.Program + CoRN.stdlib_omissions.N + CoRN.stdlib_omissions.Z + CoRN.stdlib_omissions.Q. Set Automatic Introduction. Set Automatic Introduction. diff --git a/util/SetoidPermutation.v b/util/SetoidPermutation.v index 838f4233..364f77af 100644 --- a/util/SetoidPermutation.v +++ b/util/SetoidPermutation.v @@ -1,5 +1,5 @@ Require Import - Unicode.Utf8 Setoid List Permutation Setoid Morphisms. + Coq.Unicode.Utf8 Coq.Setoids.Setoid CoRN.stdlib_omissions.List Coq.Sorting.Permutation Coq.Setoids.Setoid Coq.Classes.Morphisms. (** The standard Permutation property is not setoid-aware, so we introduce a variant that is. *) From ed87007ecd1c162668c54b7f0ef4b27e0ceb78ac Mon Sep 17 00:00:00 2001 From: Ben Sherman Date: Tue, 1 Mar 2016 16:38:44 -0500 Subject: [PATCH 19/20] Reduce [big] parameter in alternating sum length computation --- reals/faster/ARAlternatingSum.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reals/faster/ARAlternatingSum.v b/reals/faster/ARAlternatingSum.v index 87df1cdb..cd71f901 100644 --- a/reals/faster/ARAlternatingSum.v +++ b/reals/faster/ARAlternatingSum.v @@ -206,7 +206,7 @@ pick [big] such that computation will suffer from the implementation limits of C (e.g. a stack overflow) or runs out of memory, before we ever refer to the proof. *) -Definition big := Eval vm_compute in (Z.nat_of_Z 50000). +Definition big := Eval vm_compute in (Z.nat_of_Z 5000). Obligation Tactic := idtac. Program Definition ARInfAltSum_length (k : Z) : nat := 4 + takeUntil_length (λ s, AQball_bool k (hd s) 0) From 55dc22299a566f5c68297c4adb4a02f089ca89bc Mon Sep 17 00:00:00 2001 From: Ben Sherman Date: Tue, 1 Mar 2016 17:05:14 -0500 Subject: [PATCH 20/20] Comment out computation in Picard --- ode/Picard.v | 1 + 1 file changed, 1 insertion(+) diff --git a/ode/Picard.v b/ode/Picard.v index 17e8a958..82233525 100644 --- a/ode/Picard.v +++ b/ode/Picard.v @@ -444,6 +444,7 @@ rewrite abs.abs_nonneg; [reflexivity |]. change (0 <= 1 # 2)%Q. auto with qarith. Qed. +(* (* native_compute needs 8.5 *) Time Eval vm_compute in (answer 2 (` (picard_iter 2 half))). (* 10 minutes *) Time Compute answer 1 (` (f half)). (* Too long *)